// 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 org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.math.BigDecimal;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.openmhealth.schema.domain.omh.BloodPressureUnit.MM_OF_MERCURY;
import static org.openmhealth.schema.domain.omh.DescriptiveStatistic.MEDIAN;
import static org.openmhealth.schema.domain.omh.DescriptiveStatistic.MINIMUM;
import static org.openmhealth.schema.domain.omh.PositionDuringMeasurement.LYING_DOWN;
import static org.openmhealth.schema.domain.omh.PositionDuringMeasurement.SITTING;
import static org.openmhealth.schema.domain.omh.TimeFrameFactory.FIXED_MONTH;
    public void constructorShouldThrowExceptionOnUndefinedSystolicBloodPressure() {

        new BloodPressure.Builder(null, diastolicBloodPressure);
    }

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

        new BloodPressure.Builder(systolicBloodPressure, null);
    }

    @Test
    public void buildShouldConstructMeasureUsingOnlyRequiredProperties() {

        BloodPressure bloodPressure = new BloodPressure.Builder(systolicBloodPressure, diastolicBloodPressure).build();

        assertThat(bloodPressure, notNullValue());
        assertThat(bloodPressure.getSystolicBloodPressure(), equalTo(systolicBloodPressure));
        assertThat(bloodPressure.getDiastolicBloodPressure(), equalTo(diastolicBloodPressure));
        assertThat(bloodPressure.getPositionDuringMeasurement(), nullValue());
        assertThat(bloodPressure.getEffectiveTimeFrame(), nullValue());
        assertThat(bloodPressure.getDescriptiveStatistic(), nullValue());
        assertThat(bloodPressure.getUserNotes(), nullValue());
    }

    @Test
    public void buildShouldConstructMeasureUsingOptionalProperties() {

        BloodPressure bloodPressure = new BloodPressure.Builder(systolicBloodPressure, diastolicBloodPressure)
                .setPositionDuringMeasurement(LYING_DOWN)
// 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/BloodPressureUnitTests.java
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.math.BigDecimal;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.openmhealth.schema.domain.omh.BloodPressureUnit.MM_OF_MERCURY;
import static org.openmhealth.schema.domain.omh.DescriptiveStatistic.MEDIAN;
import static org.openmhealth.schema.domain.omh.DescriptiveStatistic.MINIMUM;
import static org.openmhealth.schema.domain.omh.PositionDuringMeasurement.LYING_DOWN;
import static org.openmhealth.schema.domain.omh.PositionDuringMeasurement.SITTING;
import static org.openmhealth.schema.domain.omh.TimeFrameFactory.FIXED_MONTH;

    public void constructorShouldThrowExceptionOnUndefinedSystolicBloodPressure() {

        new BloodPressure.Builder(null, diastolicBloodPressure);
    }

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

        new BloodPressure.Builder(systolicBloodPressure, null);
    }

    @Test
    public void buildShouldConstructMeasureUsingOnlyRequiredProperties() {

        BloodPressure bloodPressure = new BloodPressure.Builder(systolicBloodPressure, diastolicBloodPressure).build();

        assertThat(bloodPressure, notNullValue());
        assertThat(bloodPressure.getSystolicBloodPressure(), equalTo(systolicBloodPressure));
        assertThat(bloodPressure.getDiastolicBloodPressure(), equalTo(diastolicBloodPressure));
        assertThat(bloodPressure.getPositionDuringMeasurement(), nullValue());
        assertThat(bloodPressure.getEffectiveTimeFrame(), nullValue());
        assertThat(bloodPressure.getDescriptiveStatistic(), nullValue());
        assertThat(bloodPressure.getUserNotes(), nullValue());
    }

    @Test
    public void buildShouldConstructMeasureUsingOptionalProperties() {

        BloodPressure bloodPressure = new BloodPressure.Builder(systolicBloodPressure, diastolicBloodPressure)
                .setPositionDuringMeasurement(LYING_DOWN)
                .setEffectiveTimeFrame(FIXED_MONTH)