@Test
public void testFormatThrown() {

    Exception e = new IOException("Fake I/O");
    e = new Exception(e.toString(), e);
    assertNotNull(e.getMessage(), e.getMessage());
    CompactFormatter cf = new CompactFormatter();
    LogRecord record = new LogRecord(Level.SEVERE, "");
    record.setThrown(e);
    String result = cf.formatThrown(record);
    assertTrue(result, result.startsWith(e.getCause().getClass().getSimpleName()));
    assertTrue(result, result.contains(cf.formatMessage(record.getThrown())));
    assertTrue(result, result.endsWith(cf.formatBackTrace(record)));
}