@Test
public void testFormatWithMessageAndThrownLeftToRight() {

    LogRecord record = new LogRecord(Level.SEVERE, "message");
    record.setThrown(new Throwable("thrown"));
    CompactFormatter cf = new CompactFormatter();
    String result = cf.format(record);
    assertTrue(result, result.startsWith(record.getMessage()));
    assertTrue(result, result.contains("|"));
    assertTrue(result, result.contains(Throwable.class.getSimpleName()));
    assertTrue(result, result.contains(CompactFormatterTest.class.getSimpleName()));
    assertTrue(result, result.contains("testFormatWithMessageAndThrown"));
    assertTrue(result, result.contains(String.valueOf(
            record.getThrown().getStackTrace()[0].getLineNumber())));
    assertTrue(result, result.endsWith(LINE_SEP));
}