public void detachAndStopAllAppenders() {
        for (Appender<E> a : appenderList) {
            a.stop();
        }
        appenderList.clear();
    }
@Test
    public void testDetachAndStopAllAppenders() throws Exception {
        NOPAppender<TestEvent> ta = new NOPAppender<TestEvent>();
        ta.start();
        aai.addAppender(ta);
        NOPAppender<TestEvent> tab = new NOPAppender<TestEvent>();
        tab.setName("test");
        tab.start();
        aai.addAppender(tab);
        Assertions.assertTrue(tab.isStarted(), "Appender was not started");
        aai.detachAndStopAllAppenders();
        Assertions.assertNull(aai.getAppender("test"), "Appender was not removed");
        Assertions.assertFalse(tab.isStarted(), "Appender was not stopped");
    }