### Question:
XMLListHandler { @Nonnull public static ESuccess writeList (@Nonnull final Collection <String> aCollection, @Nonnull final IHasOutputStream aOSP) { ValueEnforcer.notNull (aOSP, "OutputStreamProvider"); return writeList (aCollection, aOSP.getOutputStream (EAppend.DEFAULT)); } private  XMLListHandler(); @Nullable @ReturnsMutableCopy static ICommonsList <String> readList(@Nonnull final IHasInputStream aISP); @Nonnull static ESuccess readList(@Nonnull final IHasInputStream aISP, @Nonnull final Collection <String> aTargetList); @Nullable @ReturnsMutableCopy static ICommonsList <String> readList(@Nonnull @WillClose final InputStream aIS); @Nonnull static ESuccess readList(@Nonnull @WillClose final InputStream aIS, @Nonnull final Collection <String> aTargetList); @Nonnull static ESuccess readList(@Nonnull final IMicroElement aParentElement, @Nonnull final Collection <String> aTargetList); @Nonnull static IMicroDocument createListDocument(@Nonnull final Collection <String> aCollection); @Nonnull static ESuccess writeList(@Nonnull final Collection <String> aCollection, @Nonnull final IHasOutputStream aOSP); @Nonnull static ESuccess writeList(@Nonnull final Collection <String> aCollection, @Nonnull @WillClose final OutputStream aOS); static final String ELEMENT_LIST; static final String ELEMENT_ITEM; static final String ATTR_VALUE; }### Answer:
@Test public void testWriteInvalid () { final ICommonsList <String> aList = new CommonsArrayList <> (); try { XMLListHandler.writeList (aList, (IHasOutputStream) null); fail (); } catch (final NullPointerException ex) {} try { XMLListHandler.writeList (aList, (OutputStream) null); fail (); } catch (final NullPointerException ex) {} try { XMLListHandler.writeList (null, new NonBlockingByteArrayOutputStream ()); fail (); } catch (final NullPointerException ex) {} }