### Question:
ListPM extends AbstractPM implements IListPM<T> { public void addAll(Collection<T> col) { int startIndex = size(); for (T elem : col) { Entry entry = new Entry(elem); entries.add(entry); onAdd(elem); } support.fireElementsAdded(startIndex, col.size()); } ListPM();  ListPM(int initialCapacity);  ListPM(ArrayList<Entry> list); protected  ListPM(List<Entry> list); Sorter getSorter(); void setSorter(Sorter sorter); boolean isRevalidateElementsOnChangeEnabled(); void setRevalidateElementsOnChangeEnabled(boolean enabled); void addListListener(ListListener l); void removeListListener(ListListener l); void revalidateElements(); void replace(T oldElement, T newElement); void replace(int index, T newElement); void add(T element); void add(int index, T element); void addAll(Collection<T> col); boolean contains(T element); boolean containsAll(Collection<T> col); void clear(); boolean removeAll(Collection<? extends T> col); boolean remove(T element); T removeAt(int index); void swap(int indexA, int indexB); void swap(T elemA, T elemB); void reverse(); void sortBy(boolean ascending, Path... paths); void sortBy(Collection<SortKey> newSortKeys); void sortBy(SortKey... newSortKeys); Collection<SortKey> getSortKeys(); T getAt(int index); Collection<T> toCollection(); Object[] toArray(); Selection<T> getSelection(); int indexOf(T element); int[] indicesOf(Collection<? extends T> col); int size(); boolean isEmpty(); Iterator<T> iterator(); ListIterator<T> listIterator(final int index);  }### Answer:
@Test public void addAll() { Collection<DummyPM> newCol = new LinkedList<DummyPM>(); DummyPM pModel = new DummyPM(); int newId = size; pModel.id.setInteger(newId); newCol.add(pModel); list.addAll(newCol); assertEquals("list.size()", size + 1, list.size()); assertEquals("counter.elementsAdded", 1, counter.elementsAdded); assertEquals("counter.elementsRemoved", 0, counter.elementsRemoved); assertEquals("counter.elementsSelected", 0, counter.elementsSelected); assertEquals("counter.elementsDeselected", 0, counter.elementsDeselected); assertEquals("list.contains(pModel)", true, list.contains(pModel)); assertEquals("list.getSelection().getMaxIndex()", -1, list.getSelection().getMaxIndex()); assertEquals("list.getSelection().getMinIndex()", -1, list.getSelection().getMinIndex()); assertEquals("newCol.size()", 1, newCol.size()); assertEquals("list.containsAll( newCol)", true, list.containsAll(newCol)); }