CollectionView implements Collection<E> { public void clear() { this.collection.clear(); } 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 testClear() { this.source.add(new Object()); this.source.add(new Object()); this.source.add(new Object()); assertEquals(3, this.testobj.size()); this.testobj.clear(); assertEquals(0, this.testobj.size()); }