### Question:
FilterLogListener implements LogListener,Configurable { public boolean permitLogging(String tagLevel) { Integer i = LEVELS.get(tagLevel); if (i == null) i = LEVELS.get(Log.INFO); Integer j = LEVELS.get(priority); return i >= j; } 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 testPermitLogging() throws Throwable { boolean result = new FilterLogListener().permitLogging("info"); assertTrue(result, "result"); }
@Test public void testPermitLogging1() throws Throwable { boolean result = new FilterLogListener().permitLogging("trace"); assertFalse(result, "result"); }
@Test public void testPermitLogging3() throws Throwable { boolean result = new FilterLogListener().permitLogging("testFilterLogListenerTagLevel"); assertTrue(result, "result"); }
@Test public void testPermitLoggingThrowsNullPointerException() throws Throwable { try { new FilterLogListener().permitLogging(null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { assertNull(ex.getMessage(), "ex.getMessage()"); } }