// Path: java-schema-sdk/src/main/java/org/openmhealth/schema/domain/omh/TemperatureUnit.java
// public enum TemperatureUnit implements Unit {
// 
//     KELVIN("K"),
//     CELSIUS("C"),
//     FAHRENHEIT("F");
// 
//     private static Map<String, TemperatureUnit> constantsBySchemaValue = Maps.newHashMap();
//     private final String schemaValue;
// 
//     static {
//         for (TemperatureUnit unit : values()) {
//             constantsBySchemaValue.put(unit.getSchemaValue(), unit);
//         }
//     }
// 
//     TemperatureUnit(String schemaValue) {
//         this.schemaValue = schemaValue;
//     }
// 
//     @Override
//     @JsonValue
//     public String getSchemaValue() {
//         return schemaValue;
//     }
// 
//     @Nullable
//     @JsonCreator
//     public static TemperatureUnit findBySchemaValue(String schemaValue) {
//         return constantsBySchemaValue.get(schemaValue);
//     }
// 
//     public TemperatureUnitValue newUnitValue(BigDecimal value) {
//         return new TemperatureUnitValue(this, value);
//     }
// 
//     public TemperatureUnitValue newUnitValue(double value) {
//         return new TemperatureUnitValue(this, value);
//     }
// 
//     public TemperatureUnitValue newUnitValue(long value) {
//         return new TemperatureUnitValue(this, value);
//     }
// }
// 
// Path: java-schema-sdk/src/test/java/org/openmhealth/schema/domain/omh/TimeFrameFactory.java
// public static final TimeFrame FIXED_POINT_IN_TIME =
//         new TimeFrame(ZonedDateTime.of(2015, OCTOBER.getValue(), 21, 16, 29, 0, 0, PT).toOffsetDateTime());


import org.testng.annotations.Test;
import java.time.OffsetDateTime;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.openmhealth.schema.domain.omh.BodyTemperature.MeasurementLocation.ORAL;
import static org.openmhealth.schema.domain.omh.BodyTemperature.MeasurementLocation.RECTAL;
import static org.openmhealth.schema.domain.omh.DescriptiveStatistic.MAXIMUM;
import static org.openmhealth.schema.domain.omh.TemperatureUnit.*;
import static org.openmhealth.schema.domain.omh.TimeFrameFactory.FIXED_POINT_IN_TIME;
                .setEffectiveTimeFrame(OffsetDateTime.parse("2015-11-10T14:16:01Z"))
                .setMeasurementLocation(RECTAL)
                .build();

        assertThat(bodyTemperature.equals(sameBodyTemperature), is(true));
    }

    @Test
    public void equalsShouldReturnFalseWhenRequiredValuesAreDifferent() {

        BodyTemperature bodyTemperature = new BodyTemperature.Builder(new TemperatureUnitValue(KELVIN, 310L))
                .setEffectiveTimeFrame(OffsetDateTime.parse("2015-11-10T14:16:01Z"))
                .setMeasurementLocation(RECTAL)
                .build();

        BodyTemperature withDifferentRequiredValues =
                new BodyTemperature.Builder(new TemperatureUnitValue(FAHRENHEIT, 98.33))
                        .setEffectiveTimeFrame(OffsetDateTime.parse("2015-11-10T14:16:01Z"))
                        .setMeasurementLocation(RECTAL)
                        .build();

        assertThat(bodyTemperature.equals(withDifferentRequiredValues), is(false));
    }

    @Test
    public void equalsShouldReturnTrueWhenOptionalValuesAreDifferent() {

        BodyTemperature bodyTemperature = new BodyTemperature.Builder(new TemperatureUnitValue(KELVIN, 310L))
                .setEffectiveTimeFrame(OffsetDateTime.parse("2015-11-10T14:16:01Z"))
                .setMeasurementLocation(RECTAL)
// Path: java-schema-sdk/src/main/java/org/openmhealth/schema/domain/omh/TemperatureUnit.java
// public enum TemperatureUnit implements Unit {
// 
//     KELVIN("K"),
//     CELSIUS("C"),
//     FAHRENHEIT("F");
// 
//     private static Map<String, TemperatureUnit> constantsBySchemaValue = Maps.newHashMap();
//     private final String schemaValue;
// 
//     static {
//         for (TemperatureUnit unit : values()) {
//             constantsBySchemaValue.put(unit.getSchemaValue(), unit);
//         }
//     }
// 
//     TemperatureUnit(String schemaValue) {
//         this.schemaValue = schemaValue;
//     }
// 
//     @Override
//     @JsonValue
//     public String getSchemaValue() {
//         return schemaValue;
//     }
// 
//     @Nullable
//     @JsonCreator
//     public static TemperatureUnit findBySchemaValue(String schemaValue) {
//         return constantsBySchemaValue.get(schemaValue);
//     }
// 
//     public TemperatureUnitValue newUnitValue(BigDecimal value) {
//         return new TemperatureUnitValue(this, value);
//     }
// 
//     public TemperatureUnitValue newUnitValue(double value) {
//         return new TemperatureUnitValue(this, value);
//     }
// 
//     public TemperatureUnitValue newUnitValue(long value) {
//         return new TemperatureUnitValue(this, value);
//     }
// }
// 
// Path: java-schema-sdk/src/test/java/org/openmhealth/schema/domain/omh/TimeFrameFactory.java
// public static final TimeFrame FIXED_POINT_IN_TIME =
//         new TimeFrame(ZonedDateTime.of(2015, OCTOBER.getValue(), 21, 16, 29, 0, 0, PT).toOffsetDateTime());


// Path: java-schema-sdk/src/test/java/org/openmhealth/schema/domain/omh/BodyTemperatureUnitTests.java
import org.testng.annotations.Test;
import java.time.OffsetDateTime;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.openmhealth.schema.domain.omh.BodyTemperature.MeasurementLocation.ORAL;
import static org.openmhealth.schema.domain.omh.BodyTemperature.MeasurementLocation.RECTAL;
import static org.openmhealth.schema.domain.omh.DescriptiveStatistic.MAXIMUM;
import static org.openmhealth.schema.domain.omh.TemperatureUnit.*;
import static org.openmhealth.schema.domain.omh.TimeFrameFactory.FIXED_POINT_IN_TIME;

                .setEffectiveTimeFrame(OffsetDateTime.parse("2015-11-10T14:16:01Z"))
                .setMeasurementLocation(RECTAL)
                .build();

        assertThat(bodyTemperature.equals(sameBodyTemperature), is(true));
    }

    @Test
    public void equalsShouldReturnFalseWhenRequiredValuesAreDifferent() {

        BodyTemperature bodyTemperature = new BodyTemperature.Builder(new TemperatureUnitValue(KELVIN, 310L))
                .setEffectiveTimeFrame(OffsetDateTime.parse("2015-11-10T14:16:01Z"))
                .setMeasurementLocation(RECTAL)
                .build();

        BodyTemperature withDifferentRequiredValues =
                new BodyTemperature.Builder(new TemperatureUnitValue(FAHRENHEIT, 98.33))
                        .setEffectiveTimeFrame(OffsetDateTime.parse("2015-11-10T14:16:01Z"))
                        .setMeasurementLocation(RECTAL)
                        .build();

        assertThat(bodyTemperature.equals(withDifferentRequiredValues), is(false));
    }

    @Test
    public void equalsShouldReturnTrueWhenOptionalValuesAreDifferent() {

        BodyTemperature bodyTemperature = new BodyTemperature.Builder(new TemperatureUnitValue(KELVIN, 310L))
                .setEffectiveTimeFrame(OffsetDateTime.parse("2015-11-10T14:16:01Z"))
                .setMeasurementLocation(RECTAL)
                .build();