MillisecondsToSecondsConverter implements Converter<Long, String> { @Override public String toWidgetValue(final Long time) { return time == null ? "" : String.valueOf(time / 1000); }  @Override Long toModelValue(final String time); @Override String toWidgetValue(final Long time); @Override Class<Long> getModelType(); @Override Class<String> getComponentType();  }
@Test public void testToWidgetValue() { assertEquals("", converter.toWidgetValue(null)); assertEquals("0", converter.toWidgetValue(1l)); assertEquals("1", converter.toWidgetValue(1000l)); }