// Path: app/src/main/java/com/waynedgrant/cirrus/measures/Pressure.java
// public class Pressure {
//     private BigDecimal hectopascals;
//     private BigDecimal millibars;
//     private BigDecimal kilopascals;
//     private BigDecimal inchesOfMercury;
//     private BigDecimal millimetresOfMercury;
// 
//     public Pressure(BigDecimal hectopascals) {
//         this.hectopascals = hectopascals;
//         this.millibars = hectopascals;
//         this.kilopascals = hectopascals.divide(new BigDecimal("10"), DECIMAL32);
//         this.inchesOfMercury = hectopascals.multiply(new BigDecimal("0.02953"), DECIMAL32);
//         this.millimetresOfMercury = hectopascals.multiply(new BigDecimal("0.750062"), DECIMAL32);
//     }
// 
//     public BigDecimal getValue(PressureUnit unit) {
//         BigDecimal value = null;
// 
//         switch (unit) {
//             case HECTOPASCALS:
//                 value = hectopascals;
//                 break;
//             case MILLIBARS:
//                 value = millibars;
//                 break;
//             case KILIOPASCALS:
//                 value = kilopascals;
//                 break;
//             case INCHES_OF_MERCURY:
//                 value = inchesOfMercury;
//                 break;
//             case MILLIMETRES_OF_MERCURY:
//                 value = millimetresOfMercury;
//                 break;
//         }
// 
//         return value;
//     }
// }
// 
// Path: app/src/main/java/com/waynedgrant/cirrus/units/PressureUnit.java
// public enum PressureUnit {
//     HECTOPASCALS("Hectopascals (hPa)"),
//     INCHES_OF_MERCURY("Inches of Mercury (inHg)"),
//     KILIOPASCALS("Kilopascals (kPa)"),
//     MILLIBARS("Millibars (mb)"),
//     MILLIMETRES_OF_MERCURY("Millimetres of Mercury (mmHg)");
// 
//     private String description;
// 
//     PressureUnit(String description) {
//         this.description = description;
//     }
// 
//     public String toString() {
//         return description;
//     }
// }


import com.waynedgrant.cirrus.measures.Pressure;
import com.waynedgrant.cirrus.units.PressureUnit;
import org.junit.Test;
import java.math.BigDecimal;
import static junit.framework.Assert.assertEquals;
        assertEquals("---.- mmHg", testee.format(PressureUnit.MILLIMETRES_OF_MERCURY));
    }

    @Test
    public void GIVEN_non_null_pressure_WHEN_hectopascals_formatting_requested_THEN_returns_hectopascals_value_to_one_digit() {
        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.66")));
        assertEquals("1015.7 hPa", testee.format(PressureUnit.HECTOPASCALS));

        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.65")));
        assertEquals("1015.6 hPa", testee.format(PressureUnit.HECTOPASCALS));
    }

    @Test
    public void GIVEN_non_null_pressure_WHEN_millibars_formatting_requested_THEN_returns_millibars_value_to_one_digit() {
        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.66")));
        assertEquals("1015.7 mb", testee.format(PressureUnit.MILLIBARS));

        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.65")));
        assertEquals("1015.6 mb", testee.format(PressureUnit.MILLIBARS));
    }

    @Test
    public void GIVEN_non_null_pressure_WHEN_kilopascals_formatting_requested_THEN_returns_kilopascals_value_to_two_digits() {
        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.66")));
        assertEquals("101.57 kPa", testee.format(PressureUnit.KILIOPASCALS));

        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.65")));
        assertEquals("101.56 kPa", testee.format(PressureUnit.KILIOPASCALS));
    }

// Path: app/src/main/java/com/waynedgrant/cirrus/measures/Pressure.java
// public class Pressure {
//     private BigDecimal hectopascals;
//     private BigDecimal millibars;
//     private BigDecimal kilopascals;
//     private BigDecimal inchesOfMercury;
//     private BigDecimal millimetresOfMercury;
// 
//     public Pressure(BigDecimal hectopascals) {
//         this.hectopascals = hectopascals;
//         this.millibars = hectopascals;
//         this.kilopascals = hectopascals.divide(new BigDecimal("10"), DECIMAL32);
//         this.inchesOfMercury = hectopascals.multiply(new BigDecimal("0.02953"), DECIMAL32);
//         this.millimetresOfMercury = hectopascals.multiply(new BigDecimal("0.750062"), DECIMAL32);
//     }
// 
//     public BigDecimal getValue(PressureUnit unit) {
//         BigDecimal value = null;
// 
//         switch (unit) {
//             case HECTOPASCALS:
//                 value = hectopascals;
//                 break;
//             case MILLIBARS:
//                 value = millibars;
//                 break;
//             case KILIOPASCALS:
//                 value = kilopascals;
//                 break;
//             case INCHES_OF_MERCURY:
//                 value = inchesOfMercury;
//                 break;
//             case MILLIMETRES_OF_MERCURY:
//                 value = millimetresOfMercury;
//                 break;
//         }
// 
//         return value;
//     }
// }
// 
// Path: app/src/main/java/com/waynedgrant/cirrus/units/PressureUnit.java
// public enum PressureUnit {
//     HECTOPASCALS("Hectopascals (hPa)"),
//     INCHES_OF_MERCURY("Inches of Mercury (inHg)"),
//     KILIOPASCALS("Kilopascals (kPa)"),
//     MILLIBARS("Millibars (mb)"),
//     MILLIMETRES_OF_MERCURY("Millimetres of Mercury (mmHg)");
// 
//     private String description;
// 
//     PressureUnit(String description) {
//         this.description = description;
//     }
// 
//     public String toString() {
//         return description;
//     }
// }


// Path: app/src/test/java/com/waynedgrant/cirrus/presentation/formatters/TestPressureFormatter.java
import com.waynedgrant.cirrus.measures.Pressure;
import com.waynedgrant.cirrus.units.PressureUnit;
import org.junit.Test;
import java.math.BigDecimal;
import static junit.framework.Assert.assertEquals;

        assertEquals("---.- mmHg", testee.format(PressureUnit.MILLIMETRES_OF_MERCURY));
    }

    @Test
    public void GIVEN_non_null_pressure_WHEN_hectopascals_formatting_requested_THEN_returns_hectopascals_value_to_one_digit() {
        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.66")));
        assertEquals("1015.7 hPa", testee.format(PressureUnit.HECTOPASCALS));

        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.65")));
        assertEquals("1015.6 hPa", testee.format(PressureUnit.HECTOPASCALS));
    }

    @Test
    public void GIVEN_non_null_pressure_WHEN_millibars_formatting_requested_THEN_returns_millibars_value_to_one_digit() {
        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.66")));
        assertEquals("1015.7 mb", testee.format(PressureUnit.MILLIBARS));

        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.65")));
        assertEquals("1015.6 mb", testee.format(PressureUnit.MILLIBARS));
    }

    @Test
    public void GIVEN_non_null_pressure_WHEN_kilopascals_formatting_requested_THEN_returns_kilopascals_value_to_two_digits() {
        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.66")));
        assertEquals("101.57 kPa", testee.format(PressureUnit.KILIOPASCALS));

        testee = new PressureFormatter(new Pressure(new BigDecimal("1015.65")));
        assertEquals("101.56 kPa", testee.format(PressureUnit.KILIOPASCALS));
    }

    @Test