### Question:
TreatmentActivityPresentation extends PresentationModel<TreatmentActivity> { public String getName() { String name = ""; for(DrugTreatment ta : getBean().getTreatments()) { name += (ta.getDrug() == null ? "MISSING" : ta.getDrug()) + " + "; } return name.length() > 0 ? name.substring(0, name.length() - 3) : ""; } TreatmentActivityPresentation(final TreatmentActivity ta); DrugTreatmentPresentation getTreatmentModel(DrugTreatment ta); List<DrugTreatmentPresentation> getTreatmentModels(); String getName(); static final String PROPERTY_NAME; }### Answer:
@Test public void testName() { assertEquals("Fluoxetine + Paroxetine", d_pm.getName()); d_pm.getBean().getTreatments().get(0).setDrug(null); assertEquals("MISSING + Paroxetine", d_pm.getName()); }