### Question:
Logger implements LogProducer,Configurable { public void destroy () { NameRegistrar.unregister (NRPREFIX+name); removeAllListeners (); } Logger(); Configuration getConfiguration(); @Override void setConfiguration(Configuration cfg); void addListener(LogListener l); void removeListener(LogListener l); void removeAllListeners(); static void log(LogEvent evt); void setName(String name); void destroy(); synchronized static Logger getLogger(String name); String getName(); boolean hasListeners(); static final String NRPREFIX; }### Answer:
@Test public void testDestroy() throws Throwable { Logger logger = new Logger(); LogListener l = new SimpleLogListener(); logger.addListener(l); logger.destroy(); assertEquals(0, logger.listeners.size(), "m_logger.listeners.size()"); assertFalse(logger.listeners.contains(l), "m_logger.listeners.contains(l)"); }