public static String dateTime(Date date) {
        if (date == null) {
            return null;
        }
        return formatter.format(date.toInstant().atZone(ZoneId.systemDefault()));
    }
@Test
    public void testDateTimeWithNullDate() {
        Date nullDate = null;
        String actual = DateUtils.dateTime(nullDate);
        assertNull("Test when date is null", actual);
    }