### Question:
NetworkMetaAnalysisWizardPM extends AbstractAnalysisWizardPresentation<MetaAnalysis> { public static List<TreatmentDefinition> filterDefinitionsMeasured(final Variable var, Collection<TreatmentDefinition> defs, final Collection<Study> studies) { return (List<TreatmentDefinition>) CollectionUtils.select(defs, new Predicate<TreatmentDefinition>() { public boolean evaluate(TreatmentDefinition def) { for (Study s : studies) { if (!s.getMeasuredArms(var, def).isEmpty()) { return true; } } return false; } }); } NetworkMetaAnalysisWizardPM(Domain d, PresentationModelFactory pmf); static List<Study> filterStudiesComparing(final Variable var, final Collection<Study> studies, final Collection<TreatmentDefinition> defs); static List<TreatmentDefinition> filterDefinitionsMeasured(final Variable var, Collection<TreatmentDefinition> defs, final Collection<Study> studies); ObservableList<TreatmentDefinition> getSelectedRawTreatmentDefinitions(); ObservableList<TreatmentDefinition> getSelectedRefinedTreatmentDefinitions(); TreatmentDefinitionsGraphModel getOverviewGraph(); ValueModel getRawSelectionCompleteModel(); ValueModel getRefinedSelectionCompleteModel(); ValueHolder<Boolean> getOverviewGraphConnectedModel(); @Override MetaAnalysis createAnalysis(String name); ObservableList<Study> getSelectedStudies(); void rebuildOverviewGraph(); void populateSelectableStudies(); ValueModel getStudiesMeasuringLabelModel(); ObservableList<OutcomeMeasure> getAvailableOutcomeMeasures(); ValueHolder<OutcomeMeasure> getOutcomeMeasureModel(); ObservableList<TreatmentDefinition> getAvailableRawTreatmentDefinitions(); ObservableList<TreatmentDefinition> getAvailableRefinedTreatmentDefinitions(); boolean rebuildRefinedAlternativesGraph(); boolean rebuildRawAlternativesGraph(); SelectableTreatmentDefinitionsGraphModel getRefinedAlternativesGraph(); SelectableTreatmentDefinitionsGraphModel getRawAlternativesGraph(); void rebuildArmSelection(); ObservableList<Arm> getArmsPerStudyPerDefinition(Study study, TreatmentDefinition definition); ModifiableHolder<Arm> getSelectedArmModel(Study study, TreatmentDefinition definition); SelectableStudyCharTableModel getSelectableStudyListPM(); SortedSet<Drug> getSelectedDrugs(); List<TreatmentCategorization> getAvailableCategorizations(Drug drug); ValueModel getCategorizationModel(Drug drug); String getRawDescription(); String getRefinedDescription();  }### Answer:
@Test public void testFilterDefinitionsMeasured() { TreatmentDefinition tFluox = TreatmentDefinition.createTrivial(ExampleData.buildDrugFluoxetine()); TreatmentDefinition tParox = TreatmentDefinition.createTrivial(ExampleData.buildDrugParoxetine()); TreatmentDefinition tSertr = TreatmentDefinition.createTrivial(ExampleData.buildDrugSertraline()); Study studyCombi = ExampleData.realBuildStudyCombinationTreatment(); Study studyChoui = ExampleData.buildStudyChouinard(); Endpoint hamd = ExampleData.buildEndpointHamd(); Endpoint cgi = ExampleData.buildEndpointCgi(); assertEquals(Collections.emptyList(), NetworkMetaAnalysisWizardPM.filterDefinitionsMeasured(hamd, Arrays.asList(tFluox, tParox), Collections.singletonList(studyCombi))); assertEquals(Arrays.asList(tSertr), NetworkMetaAnalysisWizardPM.filterDefinitionsMeasured(hamd, Arrays.asList(tFluox, tParox, tSertr), Collections.singletonList(studyCombi))); assertEquals(Arrays.asList(tFluox, tParox), NetworkMetaAnalysisWizardPM.filterDefinitionsMeasured(cgi, Arrays.asList(tFluox, tParox, tSertr), Arrays.asList(studyCombi, studyChoui))); }