### Question:
DataConverter { public String convert(Object val) { if (val == null) { return null; } String converted; if (val instanceof String) { converted = val.toString(); } else if (val instanceof InetAddress) { converted = val.toString(); } else if (val instanceof UUID) { converted = val.toString(); } else if (val instanceof Date) { converted = dateFomrat.get().format(val); } else if (val instanceof LocalDateTime) { converted = timeFormatter.format((LocalDateTime) val); } else if (val instanceof BigInteger) { converted = val.toString(); } else if (val instanceof Double) { converted = Double.toString((Double) val); } else if (val instanceof BigDecimal) { converted = val.toString(); } else if (val instanceof Boolean) { converted = Boolean.toString((Boolean) val); } else if (val instanceof Integer) { converted = Integer.toString((Integer) val); } else if (val instanceof Long) { converted = Long.toString((Long) val); } else if (val instanceof Float) { converted = Float.toString((Float) val); } else { LOG.warn("Could not find mapping for type: {}", val.getClass()); converted = val.toString(); } LOG.trace("Converted: {} to {}", val, converted); return converted; } protected  DataConverter(); String trimColumnContent(String content, boolean embeddedColumn); String trimColumnTooltipContent(String content); String convert(Object val); final static String EMPTY_COL_VALUE; }### Answer:
@Test public void testConvert_Null() { assertNull(converter.convert(null)); }
@Test public void testConvert_String() { assertEquals("abc cde ", converter.convert("abc cde ")); }
@Test public void testConvert_InetAddress() { assertEquals("localhost/127.0.0.1", converter.convert(InetAddress.getLoopbackAddress())); }
@Test public void testConvert_UUID() { final UUID id = UUID.randomUUID(); assertEquals(id.toString(), converter.convert(id)); }
@Test public void testConvert_Date() { final String actual = converter.convert(LocalDateTime.parse("2014-03-03T08:33:46.821")); assertEquals("2014-03-03 08:33:46.821", actual); }
@Test public void testConvert_BigInteger() { assertEquals("1393832026821", converter.convert(BigInteger.valueOf(1393832026821L))); }
@Test public void testConvert_Double() { assertEquals("123.32444", converter.convert(Double.valueOf(123.32444))); }
@Test public void testConvert_BigDecimal() { assertEquals("123.32444", converter.convert(BigDecimal.valueOf(123.32444))); }
@Test public void testConvert_Boolean() { assertEquals("false", converter.convert(Boolean.FALSE)); }
@Test public void testConvert_Integer() { assertEquals("1212122", converter.convert(Integer.valueOf(1212122))); }
@Test public void testConvert_Long() { assertEquals("1212122", converter.convert(Long.valueOf(1212122L))); }
@Test public void testConvert_Float() { assertEquals("1.2123457E23", converter.convert(Float.valueOf(121234567898765412234232F))); }