### Question:
FormattedDoubleToStringConverter extends FormattedNumberToStringConverter<Double> { @Override protected Double convertToModel(Number value) { return value.doubleValue(); } FormattedDoubleToStringConverter(String format);   }### Answer:
@Test public void testConvertToModel() { FormattedDoubleToStringConverter converter = new FormattedDoubleToStringConverter("0.00"); ValueContext context = new ValueContext(Locale.GERMAN); assertThat(converter.convertToModel("1,23", context).getOrThrow(s -> new AssertionError(s)), is(1.23)); }
@Test public void testConvertToModel_Null() { FormattedDoubleToStringConverter converter = new FormattedDoubleToStringConverter("0.00"); ValueContext context = new ValueContext(Locale.GERMAN); assertThat(converter.convertToModel("", context).getOrThrow(s -> new AssertionError(s)), is(nullValue())); }