### Question:
RotateLogListener extends SimpleLogListener implements Configurable, Destroyable { public void destroy () { if (rotate != null) rotate.cancel(); try { closeLogFile (); } catch (IOException e) { logDebug(e.getMessage()); } } RotateLogListener(); void setConfiguration(Configuration cfg); synchronized LogEvent log(LogEvent ev); void logRotate(); synchronized void logRotate(boolean isStartup); void destroy(); static final int CHECK_INTERVAL; static final long DEFAULT_MAXSIZE; }### Answer:
@Test public void testDestroy() throws Throwable { RotateLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.destroy(); assertNull(((DailyLogListener) dailyLogListener).f, "(DailyLogListener) dailyLogListener.f"); }