### Question:
AbstractPath implements Path { public Path getCommonAncestor( Path that ) { CheckArg.isNotNull(that, "that"); if (that.isRoot()) return that; Path normalizedPath = this.getNormalizedPath(); int lastIndex = 0; Iterator<Segment> thisIter = normalizedPath.iterator(); Iterator<Segment> thatIter = that.getNormalizedPath().iterator(); while (thisIter.hasNext() && thatIter.hasNext()) { Segment thisSeg = thisIter.next(); Segment thatSeg = thatIter.next(); if (thisSeg.equals(thatSeg)) { ++lastIndex; } else { break; } } if (lastIndex == 0) return RootPath.INSTANCE; return normalizedPath.subpath(0, lastIndex); }  boolean isIdentifier(); Path getCanonicalPath(); Path getCommonAncestor( Path that ); Path.Segment getLastSegment(); boolean endsWith( Name nameOfLastSegment ); boolean endsWith( Name nameOfLastSegment,
                             int snsIndex ); Path getParent(); Segment getSegment( int index ); Segment[] getSegmentsArray(); Path getNormalizedPath(); String getString(); String getString( TextEncoder encoder ); String getString( NamespaceRegistry namespaceRegistry ); String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder ); String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder,
                             TextEncoder delimiterEncoder ); boolean hasSameAncestor( Path that ); boolean isAncestorOf( Path decendant ); boolean isAtOrBelow( Path other ); boolean isAtOrAbove( Path other ); boolean isDecendantOf( Path ancestor ); boolean isSameAs( Path other ); Iterator<Segment> iterator(); Iterator<Path> pathsFromRoot(); Path relativeToRoot(); Path relativeTo( Path startingPath ); Path resolve( Path relativePath ); Path resolveAgainst( Path absolutePath ); Path subpath( int beginIndex ); Path subpath( int beginIndex,
                         int endIndex ); @Override int hashCode(); @Override boolean equals( Object obj ); int compareTo( Path that ); @Override String toString(); static final Path SELF_PATH; }### Answer:
@Test( expected = IllegalArgumentException.class ) public void shouldNotAllowGettingAncestorOfNullPath() { path.getCommonAncestor(null); }