CompactFormatter extends java.util.logging.Formatter { protected String toAlternate(final String s) { return s != null ? s.replaceAll("[\\x00-\\x1F\\x7F]+", "") : null; } 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 testToAlternate() { CompactFormatter cf = new CompactFormatter(); assertEquals("", cf.toAlternate(LINE_SEP)); }
@Test public void testToAlternateNull() { CompactFormatter cf = new CompactFormatter(); assertNull(cf.toAlternate((String) null)); }