@Test
public void testToString() {

    String msg = "message";
    CollectorFormatter f = new CollectorFormatter("{3}", (Formatter) null,
            (Comparator<LogRecord>) null);
    f.format(new LogRecord(Level.SEVERE, msg));
    f.format(new LogRecord(Level.SEVERE, msg));
    f.format(new LogRecord(Level.SEVERE, msg));
    f.format(new LogRecord(Level.SEVERE, msg));
    String result = f.toString();
    assertEquals(result, f.toString());
    assertEquals(result, f.getTail((Handler) null));
    assertFalse(result.equals(f.toString()));
}