### Question:
DateUtil { public static LocalDateTime localDateTime(Date date) { return date == null ? null : date.toInstant() .atZone(ZoneId.systemDefault()) .toLocalDateTime(); }  static LocalDateTime localDateTime(Date date);  }### Answer:
@Test public void testLocalDateConversion() { Date now = new Date(); LocalDateTime localDateTime = DateUtil.localDateTime(now); Instant ldtInstant = localDateTime.toInstant(OffsetDateTime.now().getOffset()); Assertions.assertEquals(ldtInstant, now.toInstant()); }