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