### Question:
SingleElementList implements ICommonsList <ELEMENTTYPE> { public boolean addAll (@Nonnull final Collection <? extends ELEMENTTYPE> aElements) { ValueEnforcer.notNull (aElements, "Elements"); ValueEnforcer.isTrue (aElements.size () <= 1, "Cannot add lists with more than one element!"); if (m_bHasElement) throw new IllegalStateException ("List already contains an element"); final Iterator <? extends ELEMENTTYPE> i = aElements.iterator (); return i.hasNext () && add (i.next ()); } SingleElementList();  SingleElementList(@Nullable final ELEMENTTYPE aElement); @Override @Nonnull @ReturnsMutableCopy SingleElementList <T> createInstance(); @Nonnull @ReturnsMutableCopy SingleElementList <ELEMENTTYPE> getClone(); boolean add(@Nullable final ELEMENTTYPE aElement); void add(@Nonnegative final int nIndex, @Nullable final ELEMENTTYPE aElement); boolean addAll(@Nonnull final Collection <? extends ELEMENTTYPE> aElements); boolean addAll(@Nonnegative final int nIndex, @Nonnull final Collection <? extends ELEMENTTYPE> aElements); void clear(); boolean contains(@Nullable final Object aElement); boolean containsAll(@Nonnull final Collection <?> aElements); ELEMENTTYPE get(@Nonnegative final int nIndex); int indexOf(final Object aElement); boolean isEmpty(); @Nonnull Iterator <ELEMENTTYPE> iterator(); int lastIndexOf(@Nullable final Object aElement); @Nonnull ListIterator <ELEMENTTYPE> listIterator(); @Nonnull ListIterator <ELEMENTTYPE> listIterator(final int nIndex); @Nullable ELEMENTTYPE remove(final int nIndex); boolean remove(@Nullable final Object aElement); boolean removeAll(@Nullable final Collection <?> aElements); @UnsupportedOperation boolean retainAll(@Nonnull final Collection <?> aElements); @Nullable ELEMENTTYPE set(@Nonnegative final int nIndex, @Nullable final ELEMENTTYPE aNewElement); @Nonnegative int size(); @Nonnull @CodingStyleguideUnaware ICommonsList <ELEMENTTYPE> subList(@Nonnegative final int nFromIndex, @Nonnegative final int nToIndex); @Nonnull Object [] toArray(); @Nonnull ARRAYELEMENTTYPE [] toArray(@Nonnull final ARRAYELEMENTTYPE [] aDest); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testAddAll () { final SingleElementList <String> aList = new SingleElementList <> ("init"); try { aList.addAll (new CommonsArrayList <> ("Hallo", "Welt")); fail (); } catch (final IllegalArgumentException ex) {} _clear (aList); try { aList.addAll (new CommonsArrayList <> ("Hallo", "Welt")); fail (); } catch (final IllegalArgumentException ex) {} assertTrue (aList.isEmpty ()); aList.addAll (new CommonsArrayList <> ("Hallo")); assertEquals (1, aList.size ()); }