Measurement { public MeasurementUnit getUnit() { return mUnit; } Measurement(double value, MeasurementUnit unit); double getValue(); MeasurementUnit getUnit(); boolean convert(MeasurementUnit to); Measurement getConverted(MeasurementUnit to);  }
@Test public void testUnitGetter() { final MeasurementUnit unit = MeasurementUnit.KILOMETER; Measurement measurement = new Measurement(10, unit); assertThat(measurement.getUnit(), is(MeasurementUnit.KILOMETER)); }