Class NodeUUIDTest

  • All Implemented Interfaces:
    junit.framework.Test

    public class NodeUUIDTest
    extends AbstractJCRTest
    NodeUUIDTest contains all tests for the javax.jcr.Node class that require a UUID (and therefore are optional). If the repository does not support the node type mix:referenceable a NotExecutableException is thrown.
    • Constructor Detail

      • NodeUUIDTest

        public NodeUUIDTest()
    • Method Detail

      • testSaveMovedRefNode

        public void testSaveMovedRefNode()
                                  throws RepositoryException,
                                         NotExecutableException
        Moves a referencable node using Session.move(String, String) with one session and saves afterward changes made with a second session to the moved node using Item.save().

        Procedure:

        • Creates node 1 and node 2 with session 1
        • Gets reference to node 1 using session 2
        • Session 1 moves node 1 under node 2, saves changes
        • Session 2 modifes node 1, saves
        This should work (since the modified node is identified by its UUID, not by position in repository) or throw an InvalidItemStateException if 'move' is reported to the second session as a sequence of remove and add events.

        Prerequisites:
        • javax.jcr.tck.NodeUUIDTest.nodetype2 must have the mixin type mix:referenceable assigned.
        • javax.jcr.tck.NodeUUIDTest.testSaveMovedRefNode.propertyname1 name of a property that can be modified in nodetype2 for testing
        Throws:
        RepositoryException
        NotExecutableException