InstantConverter implements ITypeConverter<Instant> { @Override public Instant convert(String value) { try { return Instant.parse(value); } catch(Exception e) { throw new RuntimeException(e); } } InstantConverter(); @Override Instant convert(String value); @Override Type getTargetType(); @Override String toString();  }
@Test public void testConvert() { Instant expected = Instant.now(); Instant val = new InstantConverter().convert(expected.toString()); Assert.assertEquals(expected, val); }