### Question:
FormattedIntegerToStringConverter extends FormattedNumberToStringConverter<Integer> { @Override protected Integer convertToModel(Number value) { return value.intValue(); } FormattedIntegerToStringConverter(String format);   }### Answer:
@Test public void testConvertToModel() { FormattedIntegerToStringConverter converter = new FormattedIntegerToStringConverter("#,##0"); ValueContext context = new ValueContext(Locale.GERMAN); assertThat(converter.convertToModel("1.234", context).getOrThrow(s -> new AssertionError(s)), is(1234)); }
@Test public void testConvertToModel_Null() { FormattedIntegerToStringConverter converter = new FormattedIntegerToStringConverter("#,##0"); ValueContext context = new ValueContext(Locale.GERMAN); assertThat(converter.convertToModel("", context).getOrThrow(s -> new AssertionError(s)), is(nullValue())); }