### Question:
Domain { public abstract SortedSetModel<Indication> getIndications();  abstract List<EntityCategory> getCategories(); abstract ObservableList<? extends Entity> getCategoryContents(EntityCategory node); abstract EntityCategory getCategory(Entity entity); abstract EntityCategory getCategory(Class<? extends Entity> entityClass); abstract SortedSetModel<Drug> getDrugs(); abstract ObservableList<TreatmentCategorization> getTreatmentCategorizations(); abstract SortedSetModel<Indication> getIndications(); abstract SortedSetModel<Endpoint> getEndpoints(); abstract SortedSetModel<AdverseEvent> getAdverseEvents(); abstract SortedSetModel<PopulationCharacteristic> getPopulationCharacteristics(); abstract SortedSetModel<Study> getStudies(); abstract ObservableList<TreatmentCategorization> getCategorizations(final Drug drug); abstract SortedSetModel<MetaAnalysis> getMetaAnalyses(); abstract SortedSetModel<BenefitRiskAnalysis<?>> getBenefitRiskAnalyses(); abstract SortedSetModel<Unit> getUnits(); abstract void deleteEntity(Entity entity); abstract boolean hasDependents(Entity entity); abstract ObservableList<MetaAnalysis> getPairWiseMetaAnalyses(); abstract ObservableList<MetaAnalysis> getNetworkMetaAnalyses(); abstract ObservableList<Study> getStudies(Variable e); abstract ObservableList<Study> getStudies(Drug d); abstract ObservableList<Study> getStudies(Indication i); static final Unit GRAM; static final Unit LITER; }### Answer:
@Test(expected=NullPointerException.class) public void testAddIndicationNull() { d_domain.getIndications().add(null); }
@Test public void testAddIndication() { Indication i1 = new Indication(310497006L, "Severe depression"); assertEquals(0, d_domain.getIndications().size()); d_domain.getIndications().add(i1); assertEquals(1, d_domain.getIndications().size()); assertEquals(Collections.singletonList(i1), d_domain.getIndications()); }