IntegerConverter implements ITypeConverter<Integer> { @Override public Integer convert(String value) { try { return numberFormat.parse(value).intValue(); } catch(Exception e) { throw new RuntimeException(e); } } IntegerConverter();  IntegerConverter(NumberFormat numberFormat); @Override Integer convert(String value); @Override Type getTargetType(); @Override String toString();  }
@Test public void testConvert() throws Exception { int val = new IntegerConverter().convert("1"); Assert.assertEquals(1, val); }