### Question:
ChildPath extends AbstractPath { @Override public Path getParent() { return parent; } ChildPath( Path parent,
                      Path.Segment child ); Path getAncestor( int degree ); @Override Segment getLastSegment(); @Override Path getParent(); @Override Segment getSegment( int index ); List<Segment> getSegmentsList(); @Override boolean hasSameAncestor( Path that ); boolean isAbsolute(); @Override boolean isAtOrBelow( Path other ); @Override boolean isDecendantOf( Path ancestor ); boolean isNormalized(); boolean isRoot(); @Override @SuppressWarnings( "synthetic-access" ) Iterator<Segment> iterator(); int size(); @Override Path subpath( int beginIndex,
                         int endIndex );  }### Answer:
@Test public void shouldReturnParentInstanceFromGetParent() { assertThat(path.getParent(), is(sameInstance(parent))); }