IntToDoubleConverter implements Converter<Double, Integer> { @Override public Double convertToPresentation(Integer value, ValueContext context) { if (value == null) { return null; } return value.doubleValue(); }  @Override Result<Integer> convertToModel(Double value, ValueContext context); @Override Double convertToPresentation(Integer value, ValueContext context);  }
@Test public void testConvertToPresentation() { IntToDoubleConverter cv = new IntToDoubleConverter(); assertNull(cv.convertToPresentation(null, createContext())); Double result = cv.convertToPresentation(1234, createContext()); assertEquals(1234.00, result.doubleValue(), 0.001); }