@Test
public void testZ() throws Exception {

    ISODate isoDate = new ISODate("2019-06-01T00:00Z");
    Instant instant = isoDate.toDate().toInstant().truncatedTo(ChronoUnit.SECONDS);
    ZonedDateTime expectedDateTime =
        ZonedDateTime.of(
            2019, 6, 1, 0, 0, 0, 0, ZoneId.of("Z").normalized());
    Instant expected = expectedDateTime.toInstant().truncatedTo(ChronoUnit.SECONDS);
    assertEquals( "Z", expected, instant );
    ISODate pstDate = new ISODate("2019-06-01T00:00-07:00");
    instant = pstDate.toDate().toInstant().truncatedTo(ChronoUnit.SECONDS);
    ZonedDateTime pstDateTime =
        ZonedDateTime.of(
            2019, 6, 1, 0, 0, 0, 0, ZoneId.of("UTC-07:00").normalized());
    expected = pstDateTime.toInstant().truncatedTo(ChronoUnit.SECONDS);
    assertEquals( "UTC-07:00", expected, instant );
    ISODate estDate = new ISODate("2019-06-01T00:00-04:00");
    instant = estDate.toDate().toInstant().truncatedTo(ChronoUnit.SECONDS);
    ZonedDateTime estDateTime =
        ZonedDateTime.of(
            2019, 6, 1, 0, 0, 0, 0, ZoneId.of("UTC-04:00").normalized());
    expected = estDateTime.toInstant().truncatedTo(ChronoUnit.SECONDS);
    assertEquals( "UTC-04:00", expected, instant );
}