### Question:
AudioFactory { public static synchronized void addFormat(AudioFormat format) { Check.notNull(format); for (final String current : format.getFormats()) { if (FACTORIES.put(current, format) != null) { throw new LionEngineException(ERROR_EXISTS + current); } } } private  AudioFactory(); static synchronized Audio loadAudio(Media media); static synchronized A loadAudio(Media media, Class<A> type); static synchronized void addFormat(AudioFormat format); static synchronized void clearFormats(); static final String ERROR_FORMAT; }### Answer:
@Test void testAddFormatNull() { assertThrows(() -> AudioFactory.addFormat(null), "Unexpected null argument !"); }
@Test void testAddFormatExists() { AudioFactory.addFormat(new AudioVoidFormat(Arrays.asList("png"))); assertThrows(() -> AudioFactory.addFormat(new AudioVoidFormat(Arrays.asList("png"))), AudioFactory.ERROR_EXISTS + "png"); }