### Question:
PathSet implements Set<Path> { public void removeDescendants(Path path) { Iterator<Path> i = iterator(); while (i.hasNext()) { Path p = i.next(); if (p.isDescendantOf(path)) { i.remove(); } } } 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 removeDescendants() { data.removeDescendants(new Path("/foo")); assertTrue(data.size() == 3); assertTrue(data.contains(new Path("/"))); assertTrue(data.contains(new Path("/bar"))); assertTrue(data.contains(new Path("/foo"))); data.removeDescendants(new Path("/")); assertTrue(data.size() == 1); assertTrue(data.contains(new Path("/"))); }