### Question:
GraphSession { public Node<Payload, PropertyPayload> findNodeWith( Location location ) throws PathNotFoundException, AccessControlException { UUID uuid = location.getUuid(); if (uuid != null) { Node<Payload, PropertyPayload> node = node(uuid); if (node != null) return node; if (this.deletedNodes.contains(uuid)) { String msg = GraphI18n.nodeDoesNotExistWithUuid.text(uuid, workspaceName); throw new PathNotFoundException(location, this.root.getPath(), msg); } org.modeshape.graph.Node persistentNode = store.getNodeAt(location); location = persistentNode.getLocation(); Path path = location.getPath(); if (path.isRoot()) return root; authorizer.checkPermissions(path, Action.READ); Path relativePathFromRootToParent = path.getParent().relativeToRoot(); Node<Payload, PropertyPayload> parent = findNodeRelativeTo(root, relativePathFromRootToParent, true); if (!parent.isLoaded()) parent.load(); node = parent.getChild(path.getLastSegment()); nodeOperations.materialize(persistentNode, node); return node; } assert location.hasPath(); return findNodeWith(null, location.getPath()); } GraphSession( Graph graph,
                         String workspaceName,
                         Operations<Payload, PropertyPayload> nodeOperations );  GraphSession( Graph graph,
                         String workspaceName,
                         Operations<Payload, PropertyPayload> nodeOperations,
                         Authorizer authorizer ); int getDepthForLoadingNodes(); void setDepthForLoadingNodes( int depth ); Node<Payload, PropertyPayload> getRoot(); PathFactory getPathFactory(); Node<Payload, PropertyPayload> findNodeWith( Location location ); Node<Payload, PropertyPayload> findNodeWith( NodeId id ); Node<Payload, PropertyPayload> findNodeWith( NodeId id,
                                                        Path path ); Node<Payload, PropertyPayload> findNodeWith( Path path ); Node<Payload, PropertyPayload> findNodeRelativeTo( Node<Payload, PropertyPayload> startingPoint,
                                                              Path relativePath ); boolean hasPendingChanges(); void clearAllChangedNodes(); void immediateMove( Path nodeToMove,
                               Path destination ); void immediateCopy( Path source,
                               Path destination ); Location immediateCopy( Path source,
                                   String sourceWorkspace,
                                   Path destination ); Location immediateCreateOrReplace( Path path,
                                              Collection<Property> properties ); void immediateClone( Path source,
                                String sourceWorkspace,
                                Path destination,
                                boolean removeExisting,
                                boolean destPathIncludesSegment ); @SuppressWarnings( "synthetic-access" ) void refresh( boolean keepChanges ); void refresh( Node<Payload, PropertyPayload> node,
                         boolean keepChanges ); void refreshProperties( Node<Payload, PropertyPayload> node ); void save(); void save( Node<Payload, PropertyPayload> node );  }### Answer:
@Test public void shouldCreateChildren() { Node<Object, Object> cars = cache.findNodeWith(path("/Cars")); assertChildren(cars, "Hybrid", "Sports", "Luxury", "Utility"); assertConnectionsUsed(1); Node<Object, Object> experimental = cars.createChild(name("Experimental")); assertThat(experimental.getParent(), is(sameInstance(cars))); assertChildren(cars, "Hybrid", "Sports", "Luxury", "Utility", "Experimental"); assertThat(cars.isChanged(false), is(true)); assertThat(experimental.isNew(), is(true)); assertNoMoreConnectionsUsed(); Node<Object, Object> experimental2 = cars.createChild(name("Experimental")); assertThat(experimental2.getParent(), is(sameInstance(cars))); assertChildren(cars, "Hybrid", "Sports", "Luxury", "Utility", "Experimental[1]", "Experimental[2]"); assertThat(cars.isChanged(false), is(true)); assertThat(experimental2.isNew(), is(true)); assertNoMoreConnectionsUsed(); }