public class JavaLoggingFormatterTest {
/** Test the LogInfo class. */
@Test public void testLogInfo() {
Date now = DateUtils.createDate(2011, 10, 7, 13, 1, 42, 663);
LogRecord record = mock(LogRecord.class);
when(record.getMillis()).thenReturn(now.getTime());
when(record.getLevel()).thenReturn(java.util.logging.Level.INFO);
when(record.getSourceClassName()).thenReturn("test.class.Name");
when(record.getMessage()).thenReturn("message");
LogInfo info = new LogInfo(record);
assertNotNull(info);
assertEquals(now, info.getDate());
assertEquals(org.apache.log4j.Level.INFO, info.getLevel());