### Question:
DateConverterUtils { public static LocalDateTime convert2LocalDateTime(Date date) { if (date == null) { return null; } return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); } 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_ofConvert2LocalDateTime() { Date input = null; LocalDateTime output = DateConverterUtils.convert2LocalDateTime(input); LocalDateTime expected = null; assertThat(output).isEqualTo(expected); }
@Test public void shouldBeOk_whenInputDateIs20170101T010101_ofConvert2LocalDateTime() { Date input = createDate("2017-01-01T01:01:01"); LocalDateTime output = DateConverterUtils.convert2LocalDateTime(input); LocalDateTime expected = createLocalDateTime("2017-01-01T01:01:01"); assertThat(output).isEqualTo(expected); }