LocalDateTimeConverter implements ITypeConverter<LocalDateTime> { @Override public LocalDateTime convert(String value) { return LocalDateTime.parse(value, dateTimeFormatter); } LocalDateTimeConverter();  LocalDateTimeConverter(DateTimeFormatter dateTimeFormatter); @Override LocalDateTime convert(String value); @Override Type getTargetType(); @Override String toString();  }
@Test public void testConvert() throws Exception { LocalDateTime val = new LocalDateTimeConverter().convert("2011-12-03T10:15:30"); Assert.assertEquals(2011, val.getYear()); Assert.assertEquals(12, val.getMonthValue()); Assert.assertEquals(3, val.getDayOfMonth()); Assert.assertEquals(10, val.getHour()); Assert.assertEquals(15, val.getMinute()); Assert.assertEquals(30, val.getSecond()); }