@SuppressWarnings( "deprecation" )
@Test
public void shouldHaveRootNode() throws Exception {

    session = createSession();
    javax.jcr.Node root = session.getRootNode();
    String uuid = root.getIdentifier();
    // Should be referenceable ...
    assertThat(root.isNodeType("mix:referenceable"), is(true));
    // Should have a UUID ...
    assertThat(root.getUUID(), is(uuid));
    // Should have an identifier ...
    assertThat(root.getIdentifier(), is(uuid));
    // Get the children of the root node ...
    javax.jcr.NodeIterator iter = root.getNodes();
    javax.jcr.Node system = iter.nextNode();
    assertThat(system.getName(), is("jcr:system"));
    // Add a child node ...
    javax.jcr.Node childA = root.addNode("childA", "nt:unstructured");
    assertThat(childA, is(notNullValue()));
    iter = root.getNodes();
    javax.jcr.Node system2 = iter.nextNode();
    javax.jcr.Node childA2 = iter.nextNode();
    assertThat(system2.getName(), is("jcr:system"));
    assertThat(childA2.getName(), is("childA"));
}