CollectionView implements Collection<E> { public boolean addAll(Collection<? extends E> collection) { throw new UnsupportedOperationException(); } 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(expected = UnsupportedOperationException.class) public void testAddAll() { Collection collection = new LinkedList(); collection.add(new Object()); collection.add(new Object()); collection.add(new Object()); this.testobj.addAll(collection); }