@Test
public void testByNullAndThreadDeath() {

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