### Question:
DateConverterUtils { public static LocalDate convert2LocalDate(Date date) { if (date == null) { return null; } return convert2LocalDateTime(date).toLocalDate(); } private  DateConverterUtils(); static Date convert2Date(LocalDate localDate); static Date convert2Date(LocalDateTime localDateTime); static LocalDateTime convert2LocalDateTime(Date date); static LocalDate convert2LocalDate(Date date); static long convert2Timestamp(LocalDateTime localDateTime);  }### Answer:
@Test public void shouldBeNull_whenInputDateIsNull_ofConvert2LocalDate() { Date input = null; LocalDate output = DateConverterUtils.convert2LocalDate(input); LocalDate expected = null; assertThat(output).isEqualTo(expected); }
@Test public void shouldBeOk_whenInputDateIs20170101T010101_ofConvert2LocalDate() { Date input = createDate("2017-01-01T01:01:01"); LocalDate output = DateConverterUtils.convert2LocalDate(input); LocalDate expected = createLocalDate("2017-01-01T00:00:00"); assertThat(output).isEqualTo(expected); }