CollectionView implements Collection<E> { public boolean isEmpty() { return this.collection.isEmpty(); } 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 testIsEmpty() { Object obj = new Object(); assertTrue(this.testobj.isEmpty()); this.source.add(obj); assertFalse(this.testobj.isEmpty()); this.source.add(new Object()); assertFalse(this.testobj.isEmpty()); this.source.remove(obj); assertFalse(this.testobj.isEmpty()); this.source.clear(); assertTrue(this.testobj.isEmpty()); }