### Question:
FrequencyMeasurementPresentation extends PresentationModel<FrequencyMeasurement> implements LabeledPresentation { public AbstractValueModel getLabelModel() { return new DefaultLabelModel(getBean()); } FrequencyMeasurementPresentation(FrequencyMeasurement bean); AbstractValueModel getFrequencyModel(String category); AbstractValueModel getLabelModel();  }### Answer:
@Test public void testFireLabelFemaleChanged() { AbstractValueModel lm = d_pm.getLabelModel(); PropertyChangeListener mock = createMock(PropertyChangeListener.class); PropertyChangeEvent event = new PropertyChangeEvent( lm, "value", null, "Male = N/A / Female = 100"); mock.propertyChange(JUnitUtil.eqPropertyChangeEvent(event)); expectLastCall().anyTimes(); replay(mock); PropertyChangeListener l = mock; lm.addPropertyChangeListener(l); d_measurement.setFrequency("Female", 100); verify(l); }
@Test public void testGetLabel() { assertEquals("Male = N/A / Female = N/A", d_pm.getLabelModel().getValue()); }
@Test public void testFireLabelMaleChanged() { AbstractValueModel lm = d_pm.getLabelModel(); PropertyChangeListener mock = createMock(PropertyChangeListener.class); PropertyChangeEvent event = new PropertyChangeEvent( lm, "value", null, "Male = 1 / Female = N/A"); mock.propertyChange(JUnitUtil.eqPropertyChangeEvent(event)); expectLastCall().anyTimes(); replay(mock); PropertyChangeListener l = mock; lm.addPropertyChangeListener(l); d_measurement.setFrequency("Male", 1); verify(l); }