### Question:
FilterLogListener implements LogListener,Configurable { @Override public synchronized LogEvent log(LogEvent ev) { if (p != null && permitLogging(ev.getTag())) { Date d = new Date(); p.println( "<log realm=\"" + ev.getRealm() + "\" at=\"" + d.toString() + "." + d.getTime() % 1000 + "\">" ); ev.dump(p, " "); p.println("</log>"); p.flush(); } return ev; } FilterLogListener();  FilterLogListener(PrintStream p); @Override void setConfiguration(Configuration cfg); synchronized void setPrintStream(PrintStream p); synchronized void close(); String getPriority(); void setPriority(String priority); boolean permitLogging(String tagLevel); @Override synchronized LogEvent log(LogEvent ev);  }### Answer:
@Test public void testLog() throws Throwable { FilterLogListener filterLogListener = new FilterLogListener(); filterLogListener.close(); LogEvent result = filterLogListener.log(null); assertNull(result, "result"); }
@Test public void testLog1() throws Throwable { LogEvent ev = new LogEvent(new BASE24TCPChannel(), "testFilterLogListenerTag", ""); FilterLogListener filterLogListener = new FilterLogListener(); LogEvent result = filterLogListener.log(ev); assertSame(ev, result, "result"); assertNotNull(filterLogListener.p, "filterLogListener.p"); }