### Question:
SingleElementList implements ICommonsList <ELEMENTTYPE> { @Nonnull @CodingStyleguideUnaware public ICommonsList <ELEMENTTYPE> subList (@Nonnegative final int nFromIndex, @Nonnegative final int nToIndex) { if (nFromIndex < 0 || nFromIndex > (m_bHasElement ? 1 : 0)) throw new IndexOutOfBoundsException ("Invalid from index " + nFromIndex); if (nToIndex < 0 || nToIndex > (m_bHasElement ? 1 : 0)) throw new IndexOutOfBoundsException ("Invalid to index " + nToIndex); if (!m_bHasElement || nFromIndex == nToIndex) return new CommonsArrayList <> (0); return this; } 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 @SuppressFBWarnings ("RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT") public void testSubList () { final SingleElementList <String> aList = new SingleElementList <> ("init"); assertEquals (0, aList.subList (0, 0).size ()); assertEquals (1, aList.subList (0, 1).size ()); assertEquals (0, aList.subList (1, 1).size ()); assertEquals ("init", aList.subList (0, 1).get (0)); try { aList.subList (-1, 0); fail (); } catch (final IndexOutOfBoundsException ex) {} try { aList.subList (0, 2); fail (); } catch (final IndexOutOfBoundsException ex) {} _clear (aList); }