### Question:
Collection extends jsimple.lang.Iterable<E> { public boolean removeAll(Collection<E> collection) { boolean result = false; Iterator<E> it = iterator(); while (it.hasNext()) { if (collection.contains(it.next())) { it.remove(); result = true; } } return result; } protected  Collection(); boolean add(E object); boolean addAll(Collection<? extends E> collection); void clear(); boolean contains(E object); boolean containsAll(Collection<E> collection); boolean isEmpty(); @Override abstract Iterator<E> iterator(); boolean remove(E object); boolean removeAll(Collection<E> collection); boolean retainAll(Collection<E> collection); abstract int size(); Object[] toArray(); void toArray(E[] contents); @Override String toString();  }### Answer:
@Test public void testRemoveAll() { final String[] removed = new String[3]; Collection<String> ac = new TestRemoveAllCollection(this, removed); assertTrue(ac.removeAll(new ArrayList<String>("0", "1", "2"))); for (String r : removed) { if (!"0".equals(r) && !"1".equals(r) && !"2".equals(r)) { fail("an unexpected element was removed"); } } }