@Test
public void testNewFormatterWithPattern() {

    CompactFormatter cf = new CompactFormatter("%4$s");
    String result = cf.format(new LogRecord(Level.SEVERE, ""));
    assertEquals(Level.SEVERE.getLocalizedName(), result);
}