@Test @Parameters(method = "getIsoDateTimeExamples") public void testConvertDateTimeFromString(String isoDateTime) throws ParseException { Date date = mapper.convertDateTime(isoDateTime); TimeZone timeZone = new SimpleTimeZone(0, "GMT"); GregorianCalendar calendar = new GregorianCalendar(timeZone); calendar.setTime(date); assertEquals(2015, calendar.get(Calendar.YEAR)); assertEquals(3, calendar.get(Calendar.MONTH)); assertEquals(26, calendar.get(Calendar.DATE)); assertEquals(1, calendar.get(Calendar.HOUR_OF_DAY)); assertEquals(37, calendar.get(Calendar.MINUTE)); assertEquals(17, calendar.get(Calendar.SECOND)); }
public String convertDateTime(Date date) { return iso8601DateFormat.format(date); }
Mapper { public String convertDateTime(Date date) { return iso8601DateFormat.format(date); } }
Mapper { public String convertDateTime(Date date) { return iso8601DateFormat.format(date); } Mapper(); }
Mapper { public String convertDateTime(Date date) { return iso8601DateFormat.format(date); } Mapper(); String convertDateTime(Date date); Date convertDateTime(String isodate); }
Mapper { public String convertDateTime(Date date) { return iso8601DateFormat.format(date); } Mapper(); String convertDateTime(Date date); Date convertDateTime(String isodate);  }