### Question:
DateTimesHelper { public Calendar toCalendar(T dateTime) { return toDateTime(dateTime).toCalendar(Locale.getDefault()); } DateTimesHelper(Class<T> dateTimeClass, Class<D> dateClass); T toDateTime(Calendar calendar); T toDateTime(Instant instant, String timeZoneId); T toDateTime(DateTime dateTime); T toDateTime(String dateTime, String timeZoneId); T toDateTimeWithTimeZone(String dateTime); String dateToString(D date); DateTime toDateTime(T dateTime); Calendar toCalendar(T dateTime); Calendar toCalendar(T dateTime, Locale locale); String toString(T dateTime); String toStringWithTimeZone(T dateTime); String toStringForTimeZone(T dateTime, String newZoneID);  }### Answer:
@Test public void testToCalendar_fromApiDate() { assertEquals(calendar1, dateTimesHelper.toCalendar(apiDateTime1)); assertEquals(calendar2, dateTimesHelper.toCalendar(apiDateTime2)); assertEquals(calendar3, dateTimesHelper.toCalendar(apiDateTime3)); }
@Test public void testToCalendar_fromApiDate_withLocales() { assertEquals(calendarWithLocale1, dateTimesHelper.toCalendar(apiDateTime1, LOCALE1)); assertEquals(calendarWithLocale2, dateTimesHelper.toCalendar(apiDateTime2, LOCALE2)); assertEquals(calendarWithLocale3, dateTimesHelper.toCalendar(apiDateTime3, LOCALE3)); }