@Test
public void testFormatMessageSurrogate() {

    LogRecord record = new LogRecord(Level.SEVERE,
            "a\ud801\udc00\ud801\udc00\ud801\udc00\ud801\udc00");
    record.setThrown(new Throwable("thrown"));
    CompactFormatter cf = new CompactFormatter("%7$#.6s%n");
    String result = cf.format(record);
    assertTrue(result, result.startsWith("a\ud801\udc00"));
    assertTrue(result, result.endsWith("|Thr" + LINE_SEP));
}