@Test @Disabled public void convertDateTimeFromDate() { Mapper mapper = new Mapper(); TimeZone timeZone = new SimpleTimeZone(0, "GMT"); GregorianCalendar calendar = new GregorianCalendar(timeZone); calendar.set(Calendar.YEAR, 2015); calendar.set(Calendar.MONTH, 03); calendar.set(Calendar.DATE, 26); calendar.set(Calendar.HOUR_OF_DAY, 1); calendar.set(Calendar.MINUTE, 37); calendar.set(Calendar.SECOND, 17); Date date = calendar.getTime(); String actualDateTime = mapper.convertDateTime(date); assertEquals(ISO_DATETIME_EXAMPLES[0], actualDateTime); }
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);  }