### Question:
StudyPresentation extends PresentationModel<Study> { public StudyCharacteristicHolder getCharacteristicModel(Characteristic c) { StudyCharacteristicHolder holder = d_characteristicModelMap.get(c); return holder != null ? holder : new StudyCharacteristicHolder(getBean(), c); } StudyPresentation(Study s, PresentationModelFactory pmf); StudyCharacteristicHolder getCharacteristicModel(Characteristic c); boolean isStudyFinished(); int getArmCount(); List<BasicArmPresentation> getArms(); int getPopulationCharacteristicCount(); List<? extends Variable> getPopulationCharacteristics(); LabeledPresentation getCharacteristicModel(BasicStudyCharacteristic c); List<OutcomeMeasure> getEndpoints(); List<OutcomeMeasure> getAdverseEvents(); PopulationCharTableModel getPopulationCharTableModel(); TableModel getEndpointTableModel(); TableModel getAdverseEventTableModel();  }### Answer:
@Test public void testStudyArmsUpdatesIfChanged() { StudyCharacteristicHolder model = d_model.getCharacteristicModel(DerivedStudyCharacteristic.ARMS); assertEquals(new Integer(0), model.getValue()); PropertyChangeListener mock = JUnitUtil.mockListener(model, "value", null, new Integer(1)); model.addPropertyChangeListener(mock); d_study.createAndAddArm("a", 1, null, null); verify(mock); assertEquals(new Integer(1), model.getValue()); }
@Test public void testStudySizeUpdatesIfChanged() { StudyCharacteristicHolder model = d_model.getCharacteristicModel(DerivedStudyCharacteristic.STUDYSIZE); PropertyChangeListener mock = JUnitUtil.mockListener(model, "value", null, new Integer(100)); model.addPropertyChangeListener(mock); d_study.createAndAddArm("a", 100, null, null); verify(mock); assertEquals(new Integer(100), model.getValue()); }
@Test @Ignore public void testDrugsUpdatesIfChanged() { Drug d = new Drug("testDrug","0A"); StudyCharacteristicHolder model = d_model.getCharacteristicModel(DerivedStudyCharacteristic.DRUGS); PropertyChangeListener mock = JUnitUtil.mockListener(model, "value", null, Collections.singleton(d)); model.addPropertyChangeListener(mock); d_study.createAndAddArm("a", 0, d, null); verify(mock); assertEquals(Collections.singleton(d), model.getValue()); }
@Test @Ignore public void testDoseUpdatesIfChanged() { StudyCharacteristicHolder model = d_model.getCharacteristicModel(DerivedStudyCharacteristic.DOSING); PropertyChangeListener mock = JUnitUtil.mockListener(model, "value", null, DerivedStudyCharacteristic.Dosing.FLEXIBLE); model.addPropertyChangeListener(mock); d_study.createAndAddArm("A", 0, null, new FlexibleDose(new Interval<Double>(1d,10d), DoseUnit.createMilliGramsPerDay())); verify(mock); assertEquals(DerivedStudyCharacteristic.Dosing.FLEXIBLE, model.getValue()); }