AuditLogEntryCellHelper { String convertValueToString( final Object o ) { if (o == null) { return null; } if ( o instanceof Date ) { return format.format( (Date) o ); } else if ( o instanceof BigDecimal ) { return ( (BigDecimal) o ).toPlainString(); } else { return o.toString(); } } AuditLogEntryCellHelper( final DateTimeFormat format );  AuditLogEntryCellHelper( final DateTimeFormat format,
                                    final String labelClass,
                                    final String valueClass ); static String getEventTypeDisplayText( final String eventType ); SafeHtml getSafeHtml( final AuditLogEntry event );  }
@Test public void convertValueToString() { assertEquals(null, helper.convertValueToString(null)); assertEquals("true", helper.convertValueToString(true)); assertEquals("false", helper.convertValueToString(false)); Date date = new Date(); assertEquals(format.format(date), helper.convertValueToString(date)); assertEquals(BigDecimal.ONE.toPlainString(), helper.convertValueToString(BigDecimal.ONE)); assertEquals(BigInteger.ONE.toString(), helper.convertValueToString(BigInteger.ONE)); Byte b = Byte.MAX_VALUE; assertEquals(b.toString(), helper.convertValueToString(b)); Double d = 123.456; assertEquals(d.toString(), helper.convertValueToString(d)); Float f = new Float(123.456); assertEquals(f.toString(), helper.convertValueToString(f)); Integer i = 123; assertEquals(i.toString(), helper.convertValueToString(i)); Long l = new Long(123); assertEquals(l.toString(), helper.convertValueToString(l)); Short s = 123; assertEquals(s.toString(), helper.convertValueToString(s)); assertEquals("surprise!", helper.convertValueToString("surprise!")); }