### Question:
AudioFactory { public static synchronized void clearFormats() { FACTORIES.forEach((extension, format) -> format.close()); FACTORIES.clear(); } 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 testClearFormats() { AudioFactory.addFormat(new AudioVoidFormat(Arrays.asList("png"))); assertNotNull(AudioFactory.loadAudio(Medias.create("image.png"))); AudioFactory.clearFormats(); assertThrows(() -> AudioFactory.loadAudio(Medias.create("image.png")), "[image.png] " + AudioFactory.ERROR_FORMAT); }