### Question:
EventLogRecord extends CougarLogRecord { public final String getMessage() { if (messageString == null) { renderMessageString(); } return messageString; } EventLogRecord(LoggableEvent event, Object[] extensionFields); static void setCollectionSeperator(String collectionSeperator); final void renderMessageString(); final String getMessage(); final byte[] getBytes();  }### Answer:
@Test public void testString() { mle.setFieldsToLog(new Object[]{"A string"}); assertEquals("", "A string", elr.getMessage()); }
@Test public void testBooleanTrue() { mle.setFieldsToLog(new Object[]{false}); assertEquals("", "N", elr.getMessage().toString()); }
@Test public void testBooleanFalse() { mle.setFieldsToLog(new Object[]{false}); assertEquals("", "N", elr.getMessage().toString()); }
@Test public void testDate() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); Object[] things = new Object[1]; things[0] = sdf.parse("01/12/1970"); mle.setFieldsToLog(things); assertEquals("", "1970-12-01 00:00:00.000", elr.getMessage().toString()); }
@Test public void testLoggable() throws Exception { MyLoggable ml = new MyLoggable(); mle.setFieldsToLog(new Object[]{ml}); assertEquals("", ml.getString(), elr.getMessage().toString()); }
@Test public void testArray() throws Exception { ArrayList data = new ArrayList(); data.add("one"); data.add(2); ArrayList data2 = new ArrayList(); data2.add("three"); data2.add(4); data.add(data2); mle.setFieldsToLog(new Object[]{data}); assertEquals("", "[one|2|[three|4]]", elr.getMessage().toString()); }
@Test public void testArbitraryObject() throws Exception { mle.setFieldsToLog(new Object[]{new SimpleDateFormat("")}); assertEquals("", "java.text.SimpleDateFormat@0", elr.getMessage().toString()); }
@Test public void testStringWithLineEndings() throws Exception { mle.setFieldsToLog(new Object[]{"A string"+LS}); assertEquals("Line Endings should be removed", "A string ", elr.getMessage()); }
@Test public void testStringWithTabs() throws Exception { mle.setFieldsToLog(new Object[]{"A string\t"}); assertEquals("Tabs should be removed", "A string ", elr.getMessage()); }
@Test public void testStringWithCommas() throws Exception { mle.setFieldsToLog(new Object[]{"A string,"}); assertEquals("Commas should be removed", "A string ", elr.getMessage()); }