### Question:
DisplayHierarchyNode { public PropertyPath pathTo() { return pathTo; } DisplayHierarchyNode( PropertyPath pathTo, DisplayHierarchyNode parent,
                                 DisplayRdfNode rdfNode, ShortNameRenderer shortNameRenderer ); PropertyPath pathTo(); RDFNodeWrapper terminalLink(); boolean isOnExplicitPath(); Set<PropertyPath> explicitPaths(); DisplayHierarchyNode parent(); boolean isRoot(); DisplayRdfNode rdfNode(); boolean isLoop(); boolean findAncestor( DisplayRdfNode resource ); boolean isLeaf( DisplayHierarchyContext context ); List<DisplayHierarchyNode> children(); void addSibling( DisplayHierarchyNode sibling ); List<DisplayHierarchyNode> siblings(); boolean hasSiblings(); void addHint( String hint ); String hintsString(); boolean hasHint( String hint ); boolean isSimpleResource(); String relatedLinksHTML(); List<Link> relatedLinks(); boolean hasAllProperties( Object... properties ); boolean hasAllProperties( List<Object> properties ); void pullToStart( Object... properties ); void pullToStart( List<Object> properties ); List<DisplayHierarchyNode> extractByPredicate( Object... properties ); List<DisplayHierarchyNode> extractByPredicate( List<Object> properties ); boolean isResource(); boolean isLiteral(); boolean isAnon(); boolean isList(); String getLexicalForm(); String getName(); Object getValue(); String getURI(); @Override String toString(); static final String SORT_BY_FORMAT; static final int MAX_RELATED_LINK_LABEL_LENGTH; }### Answer:
@Test public void testPathTo() { PropertyPath fooBar = new PropertyPath( "foo.bar" ); DisplayHierarchyNode child = new DisplayHierarchyNode( fooBar, dhn, new DisplayRdfNode( rm.page(), ResourceFactory.createPlainLiteral( "foo" ) ), null ); assertSame( fooBar, child.pathTo() ); }