CompactFormatter extends java.util.logging.Formatter { protected Throwable apply(final Throwable t) { return SeverityComparator.getInstance().apply(t); } CompactFormatter();  CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); String formatMessage(final Throwable t); String formatLevel(final LogRecord record); String formatSource(final LogRecord record); String formatLoggerName(final LogRecord record); String formatThrown(final LogRecord record); String formatBackTrace(LogRecord record);  }
@Test public void testApply() { CompactFormatter cf = new CompactFormatter(); cf.apply((Throwable) null); final Throwable t = new Throwable(); Throwable e = cf.apply(t); assertSame(t, e); }
@Test public void testApplyNull() { assertNull(new CompactFormatter().apply(null)); }
@Test(timeout = 30000) public void testApplyEvil() { CompactFormatter cf = new CompactFormatter(); assertNotNull(cf.apply(createEvilThrowable())); }