### Question:
DateTimeFormatterUtil { public static long packDateTimeWithZone(ZonedDateTime zdt) { String zoneId = zdt.getZone().getId(); LocalDateTime zdtInUtc = zdt.withZoneSameInstant(UTC_ZONE_ID).toLocalDateTime(); return DateTimeFormatterUtil.packDateTimeWithZone( zdtInUtc.atZone(UTC_ZONE_ID).toInstant().toEpochMilli(), zoneId); } private  DateTimeFormatterUtil(); static LocalDate stringToLocalDate(String value, String dateFormat,
                                              ZoneId defaultTimeZone); static Object stringToZonedDateTime(String value, String dateFormat, ZoneId defaultTimeZone); static Object stringToDateTime(String value, String dateFormat, ZoneId defaultTimeZone); static LocalDate bigDecimalToLocalDate(BigDecimal value, ZoneId defaultTimeZone); static LocalDateTime bigDecimalToLocalDateTime(BigDecimal value, ZoneId defaultTimeZone); static String inferDateTimeFormat(String value); static long packDateTimeWithZone(ZonedDateTime zdt); static long packDateTimeWithZone(long millisUtc, String zoneId); static ZonedDateTime constructZonedDateTime(long dateTimeWithTimeZone);  }### Answer:
@Test public void packDateTimeWithZoneTest() { LocalDateTime localDateTimeExpected = LocalDateTime.of(2015, 12, 21, 17, 42, 34, 0); ZoneId zoneIdExpected = ZoneId.of("-05:00"); long expectedLong = 5942221840384541L; ZonedDateTime expectedZdt = ZonedDateTime.of(localDateTimeExpected, zoneIdExpected); assertEquals(expectedLong, DateTimeFormatterUtil.packDateTimeWithZone(expectedZdt)); assertEquals(expectedZdt, DateTimeFormatterUtil.constructZonedDateTime(expectedLong)); }