EnumeratedIdentitySet implements Set<T> { @Override public boolean addAll(Collection<? extends T> collection) { boolean changed = false; for (T t : collection) { changed |= add(t); } return changed; } EnumeratedIdentitySet(Collection<? extends T> collection);  EnumeratedIdentitySet(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<T> iterator(); @Override Object[] toArray(); @Override T1[] toArray(T1[] a); @Override boolean add(T t); @Override boolean remove(Object o); @Override boolean containsAll(Collection<?> c); @Override boolean addAll(Collection<? extends T> collection); @Override boolean retainAll(Collection<?> collection); @Override boolean removeAll(Collection<?> collection); @Override void clear(); List<T> insertionOrderedList();  }
@Test public void addAll() { EnumeratedIdentitySet<Element> set = new EnumeratedIdentitySet<>(); set.addAll(elements); assertTrue(containsAllSame(set, elements)); }