@@ -0,0 +1,1895 @@
+package com.fasterxml.jackson.datatype.jsr310.failing;%0A%0Aimport com.fasterxml.jackson.core.JsonProcessingException;%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport com.fasterxml.jackson.databind.SerializationFeature;%0Aimport com.fasterxml.jackson.datatype.jsr310.ModuleTestBase;%0Aimport org.junit.Test;%0A%0Aimport java.time.ZoneId;%0Aimport java.time.ZoneOffset;%0Aimport java.time.ZonedDateTime;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A/**%0A * Test case for https://github.com/FasterXML/jackson-modules-java8/issues/244%0A */%0Apublic class ZonedDateTimeIssue244Test extends ModuleTestBase%0A%7B%0A    private final ObjectMapper MAPPER = newMapper()%0A            .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);%0A%0A    @Test%0A    public void zoneIdUTC() throws JsonProcessingException%0A    %7B%0A        assertSerializeAndSerialize(ZonedDateTime.now(ZoneId.of(%22UTC%22)));%0A    %7D%0A%0A    @Test%0A    public void zoneOffsetUTC() throws JsonProcessingException%0A    %7B%0A        assertSerializeAndSerialize(ZonedDateTime.now(ZoneOffset.UTC)); // fails!%0A    %7D%0A%0A    @Test%0A    public void zoneOffsetNonUTC() throws JsonProcessingException%0A    %7B%0A        assertSerializeAndSerialize(ZonedDateTime.now(ZoneOffset.ofHours(-7))); // fails!%0A    %7D%0A%0A    private void assertSerializeAndSerialize(final ZonedDateTime date) throws JsonProcessingException%0A    %7B%0A        final Example example1 = new Example(date);%0A        final String json = MAPPER.writeValueAsString(example1);%0A        final Example example2 = MAPPER.readValue(json, Example.class);%0A%0A        assertEquals(example1.getDate(), example2.getDate());%0A    %7D%0A%0A    static class Example%0A    %7B%0A        private ZonedDateTime date;%0A%0A        public Example()%0A        %7B%0A        %7D%0A%0A        public Example(final ZonedDateTime date)%0A        %7B%0A            this.date = date;%0A        %7D%0A%0A        public ZonedDateTime getDate()%0A        %7B%0A            return date;%0A        %7D%0A    %7D%0A%7D%0A

Test case for issue #244 related to deserializing ZonedDateTime (#245)