@Test
public void testByNullAndThrown() {

    LogRecord r1 = new LogRecord(Level.INFO, Level.INFO.toString());
    LogRecord r2 = new LogRecord(Level.INFO, Level.INFO.toString());
    r1.setSequenceNumber(r2.getSequenceNumber());
    r1.setMillis(r2.getMillis());
    assertEquals(r1.getLevel(), r2.getLevel());
    assertEquals(r1.getSequenceNumber(), r2.getSequenceNumber());
    assertEquals(r1.getMillis(), r2.getMillis());
    //Ensure null is less than Error.
    assertNull(r1.getThrown());
    r2.setThrown(new Error());
    assertRecordLessThan(r1, r2);
    //Ensure null is less than RuntimeException.
    assertNull(r1.getThrown());
    r2.setThrown(new RuntimeException());
    assertRecordLessThan(r1, r2);
    //Ensure null is less than Exception.
    assertNull(r1.getThrown());
    r2.setThrown(new Exception());
    assertRecordLessThan(r1, r2);
}