// Path: java-schema-sdk/src/test/java/org/openmhealth/schema/domain/omh/TimeFrameFactory.java
// public static final TimeFrame FIXED_MONTH =
//         new TimeFrame(ofStartDateTimeAndEndDateTime(
//                 LocalDate.of(2015, OCTOBER, 1).atStartOfDay(PT).toOffsetDateTime(),
//                 LocalDate.of(2015, NOVEMBER, 1).atStartOfDay(PT).toOffsetDateTime()
//         ));


import static org.openmhealth.schema.domain.omh.PhysicalActivity.SelfReportedIntensity.MODERATE;
import static org.openmhealth.schema.domain.omh.TimeFrameFactory.FIXED_MONTH;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import static java.time.ZoneOffset.UTC;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.openmhealth.schema.domain.omh.LengthUnit.MILE;
    @Test(expectedExceptions = NullPointerException.class)
    public void constructorShouldThrowExceptionOnUndefinedBody() {

        new DataPoint<>(header, null);
    }

    @Test
    public void constructorShouldWork() {

        Map<String,String> body = new HashMap<>();
        body.put("key", "value");

        DataPoint dataPoint = new DataPoint<>(header, body);

        assertThat(dataPoint, notNullValue());
        assertThat(dataPoint.getHeader(), equalTo(header));
        assertThat(dataPoint.getBody(), equalTo(body));
    }

    @Override
    protected String getSchemaFilename() {
        return SCHEMA_FILENAME;
    }

    @Test
    public void objectShouldSerializeCorrectly() throws Exception {

        PhysicalActivity physicalActivity = new PhysicalActivity.Builder("walking")
                .setDistance(new LengthUnitValue(MILE, BigDecimal.valueOf(1.5)))
                .setReportedActivityIntensity(MODERATE)
// Path: java-schema-sdk/src/test/java/org/openmhealth/schema/domain/omh/TimeFrameFactory.java
// public static final TimeFrame FIXED_MONTH =
//         new TimeFrame(ofStartDateTimeAndEndDateTime(
//                 LocalDate.of(2015, OCTOBER, 1).atStartOfDay(PT).toOffsetDateTime(),
//                 LocalDate.of(2015, NOVEMBER, 1).atStartOfDay(PT).toOffsetDateTime()
//         ));


// Path: java-schema-sdk/src/test/java/org/openmhealth/schema/domain/omh/DataPointUnitTests.java
import static org.openmhealth.schema.domain.omh.PhysicalActivity.SelfReportedIntensity.MODERATE;
import static org.openmhealth.schema.domain.omh.TimeFrameFactory.FIXED_MONTH;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import static java.time.ZoneOffset.UTC;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.openmhealth.schema.domain.omh.LengthUnit.MILE;

    @Test(expectedExceptions = NullPointerException.class)
    public void constructorShouldThrowExceptionOnUndefinedBody() {

        new DataPoint<>(header, null);
    }

    @Test
    public void constructorShouldWork() {

        Map<String,String> body = new HashMap<>();
        body.put("key", "value");

        DataPoint dataPoint = new DataPoint<>(header, body);

        assertThat(dataPoint, notNullValue());
        assertThat(dataPoint.getHeader(), equalTo(header));
        assertThat(dataPoint.getBody(), equalTo(body));
    }

    @Override
    protected String getSchemaFilename() {
        return SCHEMA_FILENAME;
    }

    @Test
    public void objectShouldSerializeCorrectly() throws Exception {

        PhysicalActivity physicalActivity = new PhysicalActivity.Builder("walking")
                .setDistance(new LengthUnitValue(MILE, BigDecimal.valueOf(1.5)))
                .setReportedActivityIntensity(MODERATE)
                .setEffectiveTimeFrame(FIXED_MONTH)