@@ -0,0 +1,1663 @@
+package org.openmhealth.shim.common.mapper;%0A%0Aimport com.fasterxml.jackson.databind.DeserializationFeature;%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport com.fasterxml.jackson.databind.SerializationFeature;%0Aimport com.fasterxml.jackson.databind.module.SimpleModule;%0Aimport com.fasterxml.jackson.datatype.jdk8.Jdk8Module;%0Aimport com.fasterxml.jackson.datatype.jsr310.JSR310Module;%0Aimport org.openmhealth.schema.serializer.Rfc3339OffsetDateTimeSerializer;%0Aimport org.testng.annotations.BeforeClass;%0A%0Aimport java.time.OffsetDateTime;%0A%0A%0A/**%0A * @author Emerson Farrugia%0A */%0Apublic abstract class DataPointMapperUnitTests %7B%0A%0A    protected static final ObjectMapper objectMapper = new ObjectMapper();%0A%0A    @BeforeClass%0A    public static void initializeObjectMapper() %7B%0A%0A        // we represent JSON numbers as Java BigDecimals%0A        objectMapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);%0A%0A        // we serialize dates, date times, and times as strings, not numbers%0A        objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);%0A%0A        // we default to the ISO8601 format for JSR-310 and support Optional%0A        objectMapper.registerModule(new JSR310Module());%0A        objectMapper.registerModule(new Jdk8Module());%0A%0A        // but we have to explicitly support the RFC3339 format over ISO8601 to make JSON Schema happy, specifically to%0A        // prevent the truncation of zero second fields%0A        SimpleModule rfc3339Module = new SimpleModule(%22rfc3339Module%22);%0A        rfc3339Module.addSerializer(new Rfc3339OffsetDateTimeSerializer(OffsetDateTime.class));%0A        objectMapper.registerModule(rfc3339Module);%0A    %7D%0A%7D%0A

Add base class for mapper unit tests