CollectionView implements Collection<E> { public boolean containsAll(Collection<?> c) { return this.collection.containsAll(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 testContainsAll() { Object obj1 = new Object(); Object obj2 = new Object(); Object obj3 = new Object(); Collection collection = new LinkedList(); collection.add(obj1); collection.add(obj2); assertFalse(this.testobj.containsAll(collection)); this.source.add(obj1); assertFalse(this.testobj.containsAll(collection)); this.source.add(obj3); assertFalse(this.testobj.containsAll(collection)); this.source.add(obj2); assertTrue(this.testobj.containsAll(collection)); this.source.add(new Object()); assertTrue(this.testobj.containsAll(collection)); this.source.remove(obj3); assertTrue(this.testobj.containsAll(collection)); this.source.remove(obj1); assertFalse(this.testobj.containsAll(collection)); }