StringToCalendarConverter extends AbstractGenericConverter<String, Calendar> { @Override public Calendar convert(String source) { return dateToCalendarConverter.convert(stringToDateConverter.convert(source)); }  @Override Calendar convert(String source);  }
@Test public void testConvert() { Calendar cal = (Calendar) converter.convert("2017-01-02"); assertEquals(2017, cal.get(Calendar.YEAR)); assertEquals(0, cal.get(Calendar.MONTH)); assertEquals(2, cal.get(Calendar.DAY_OF_MONTH)); }