CollectionView implements Collection<E> { public boolean removeAll(Collection<?> c) { return this.collection.removeAll(c); } CollectionView(Collection<E> collection); boolean add(E element); boolean addAll(Collection<? extends E> collection); void clear(); boolean contains(Object o); boolean containsAll(Collection<?> c); boolean isEmpty(); Iterator<E> iterator(); boolean remove(Object o); boolean removeAll(Collection<?> c); boolean retainAll(Collection<?> c); int size(); Object[] toArray(); T[] toArray(T[] a); String toString();  }
@Test public void testRemoveAll() { Collection remove = Arrays.asList("1", "2", "3"); assertTrue(this.source.isEmpty()); assertFalse(this.testobj.removeAll(remove)); assertTrue(this.source.isEmpty()); this.source.addAll(Arrays.asList("1", "2", "3")); assertTrue(this.testobj.removeAll(remove)); assertTrue(this.source.isEmpty()); this.source.addAll(Arrays.asList("3", "4", "5")); assertTrue(this.testobj.removeAll(remove)); assertEquals(2, this.source.size()); assertFalse(this.testobj.removeAll(remove)); assertEquals(2, this.source.size()); }