TreeLocation { @NotNull public TreeLocation getChild(String name) { return new NullLocation(this, name); }  @NotNull static TreeLocation create(@NotNull Tree tree); @NotNull static TreeLocation create(@NotNull Root root, @NotNull String path); @NotNull static TreeLocation create(@NotNull Root root); @NotNull abstract TreeLocation getParent(); abstract boolean exists(); @NotNull abstract String getName(); @NotNull abstract String getPath(); abstract boolean remove(); @NotNull TreeLocation getChild(String name); @Nullable Tree getTree(); @Nullable PropertyState getProperty(); @Override String toString();  }
@Test public void testGetChild() { TreeLocation propertyChild = nodeLocation.getChild(Text.getName(PROPERTY_PATH)); assertNotNull(propertyChild); assertTrue(propertyChild.exists()); assertEquals(child, nodeLocation.getParent().getChild(nodeLocation.getName()).getTree()); }