### Question:
RotateLogListener extends SimpleLogListener implements Configurable, Destroyable { protected synchronized void logDebug (String msg) { if (p != null) { p.println ("<log realm=\"rotate-log-listener\" at=\""+new Date().toString() +"\">"); p.println (" "+msg); p.println ("</log>"); } } 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 testLogDebug() throws Throwable { RotateLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.logDebug("testRotateLogListenerMsg"); assertNotNull(((DailyLogListener) dailyLogListener).p, "(DailyLogListener) dailyLogListener.p"); }
@Test @Disabled("test causes problems, closes stdout") public void testLogDebug1() throws Throwable { RotateLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.close(); dailyLogListener.logDebug("testRotateLogListenerMsg"); assertNull(((DailyLogListener) dailyLogListener).p, "(DailyLogListener) dailyLogListener.p"); }