### Question:
StudyActivityPresentation { public TreatmentActivityPresentation getTreatmentModel() { return d_treatmentModel; } StudyActivityPresentation(ObservableList<StudyActivity> activityList, SortedSetModel<Drug> drugOptions);  StudyActivityPresentation(ObservableList<StudyActivity> activityList, SortedSetModel<Drug> drugOptions, StudyActivity activity); boolean isEditing(); ValueModel getNameModel(); ObservableList<Note> getNotesModel(); ValueModel getActivityModel(); List<Activity> getActivityOptions(); TreatmentActivityPresentation getTreatmentModel(); OtherActivityPresentation getOtherActivityModel(); ValueHolder<Boolean> getValidModel(); void commit(); SortedSetModel<Drug> getDrugOptions();  }### Answer:
@Test public void testTreatmentModel() { StudyActivityPresentation pm1 = new StudyActivityPresentation(d_emptyList, null, d_activity); assertEquals(new TreatmentActivity(new DrugTreatment(null, null)), pm1.getTreatmentModel().getBean()); pm1.getTreatmentModel().getTreatmentModels().get(0).getModel(DrugTreatment.PROPERTY_DRUG).setValue(d_drug); assertEquals(new TreatmentActivity(new DrugTreatment(d_drug, null)), pm1.getTreatmentModel().getBean()); StudyActivity activity = new StudyActivity("Treatment", new TreatmentActivity(d_treatment)); StudyActivityPresentation pm2 = new StudyActivityPresentation(d_emptyList, null, activity); assertEquals(new TreatmentActivity(d_treatment), pm2.getTreatmentModel().getBean()); pm2.getTreatmentModel().getTreatmentModels().get(0).getModel(DrugTreatment.PROPERTY_DRUG).setValue(null); assertEquals(new TreatmentActivity(new DrugTreatment(null, d_dose)), pm2.getTreatmentModel().getBean()); JUnitUtil.assertNotEquals(new DrugTreatment(null, d_dose), d_treatment); }