### Question:
PathSet implements Set<Path> { public boolean containsAncestor(Path path) { for (Path p : this) { if (p.isAncestorOf(path)) { return true; } } return false; } PathSet();  PathSet(Set<Path> delegate); boolean equals(Object o); int hashCode(); int size(); boolean isEmpty(); boolean contains(Object o); Object[] toArray(); T[] toArray(T[] a); boolean add(Path o); boolean containsAll(Collection<?> c); boolean addAll(Collection<? extends Path> c); boolean retainAll(Collection<?> c); boolean removeAll(Collection<?> c); void clear(); boolean containsAncestor(Path path); boolean containsParent(Path path); boolean removeWithDescendants(Path path); boolean remove(Object o); void removeDescendants(Path path); Iterator<Path> iterator();  }### Answer:
@Test public void containsAncestor() { assertTrue(data.remove(new Path("/"))); assertTrue(data.containsAncestor(new Path("/foo/baz"))); assertTrue(data.containsAncestor(new Path("/bar/baz"))); assertTrue(!data.containsAncestor(new Path("/foo"))); assertTrue(!data.containsAncestor(new Path("/baz"))); }