### Question:
DateToLocalDateConverter { public static LocalDate convertToLocalDate(Date dateToConvert) { return LocalDate.ofInstant(dateToConvert.toInstant(), ZoneId.systemDefault()); }  static LocalDate convertToLocalDateViaInstant(Date dateToConvert); static LocalDate convertToLocalDateViaSqlDate(Date dateToConvert); static LocalDate convertToLocalDateViaMilisecond(Date dateToConvert); static LocalDate convertToLocalDate(Date dateToConvert);  }### Answer:
@Test public void shouldReturn10thNovember2010WhenConvertToLocalDate() { Calendar calendar = Calendar.getInstance(); calendar.set(2010, 10, 10); Date dateToConvert = calendar.getTime(); LocalDate localDateTime = DateToLocalDateConverter.convertToLocalDate(dateToConvert); assertEquals(2010, localDateTime.get(ChronoField.YEAR)); assertEquals(11, localDateTime.get(ChronoField.MONTH_OF_YEAR)); assertEquals(10, localDateTime.get(ChronoField.DAY_OF_MONTH)); }