Node { public List<String> getPathFacets() { return getPathFacets("/", true); } Node(Node parent, final String name); boolean addChild(Node node); Node addChild(String nodeName); void addChildren(Iterable<String> nodeNames); void addAttrib(String name, Comparable<?> value); boolean hasAttrib(String name); boolean hasParent(); boolean isRoot(); boolean hasChildren(); boolean isLeaf(); String getName(); Node getParent(); Node getChild(int num); List<Node> getChildren(); Comparable<?> getAttrib(String name); int getDepth(); String getPath(); String getPath(final String separator); List<String> getPathSegments(); List<String> getPathFacets(); List<String> getPathFacets(final String separator, boolean includeLevel); @Override String toString();  }
@Test public void getPathFacets() { Tree tree = new Tree(); tree.buildFromPath("one/two/three/four/five/six"); Node node = tree.getChild(0).getChild(0); List<String> facets = node.getPathFacets(); assertEquals("1/one/two", facets.get(1)); }