SortedUniqueList extends ArrayList<T> { @Override public boolean addAll( int index, Collection<? extends T> c ) { return false; } SortedUniqueList(); @Override void add( int index, T element ); @Override boolean addAll( int index, Collection<? extends T> c ); @Override boolean add( T element ); @Override boolean addAll( Collection<? extends T> c );  }
@Test public void addAll() { list.add( p1 ); list.add( p2 ); list.add( p3 ); list.addAll( list ); assertTrue( "List not should contain double Elements" + list, list.size() == 3 ); }