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