### Question:
RandomEffectsMetaAnalysis extends AbstractMetaAnalysis implements PairWiseMetaAnalysis { List<RelativeEffect<? extends Measurement>> getFilteredRelativeEffects(Class<? extends RelativeEffect<?>> type) { final List<RelativeEffect<? extends Measurement>> relativeEffects = getRelativeEffects(type); CollectionUtils.filter(relativeEffects, new Predicate<RelativeEffect<? extends Measurement>>() { public boolean evaluate(RelativeEffect<? extends Measurement> re) { return re.isDefined(); } }); return relativeEffects; } RandomEffectsMetaAnalysis(String name, OutcomeMeasure om,
			TreatmentDefinition baseline, TreatmentDefinition subject,
			List<StudyArmsEntry> studyArms, boolean corr); @Override TreatmentDefinition getFirstAlternative(); @Override TreatmentDefinition getSecondAlternative(); List<StudyArmsEntry> getStudyArms(); RandomEffectMetaAnalysisRelativeEffect<Measurement> getRelativeEffect(Class<? extends RelativeEffect<?>> type); boolean getIsCorrected(); void setIsCorrected(boolean iscorrected); @Override boolean deepEquals(Entity other); @Override MultivariateNormalSummary getRelativeEffectsSummary(); static final String PROPERTY_INCLUDED_STUDIES_COUNT; static final String PROPERTY_CORRECTED; }### Answer:
@Test public void testFilterUndefinedRelativeEffects() { List<RelativeEffect<? extends Measurement>> expected = d_rema.getFilteredRelativeEffects(BasicOddsRatio.class); Study zeroRate = ExampleData.buildRateStudy("ZeroRate 2012", 0, 120, 86, 118); d_studyList.add(zeroRate); RandomEffectsMetaAnalysis rema = ExampleData.buildRandomEffectsMetaAnalysis("meta", d_rateEndpoint, d_studyList, TreatmentDefinition.createTrivial(d_fluox), TreatmentDefinition.createTrivial(d_sertr)); List<RelativeEffect<? extends Measurement>> actual = rema.getFilteredRelativeEffects(BasicOddsRatio.class); assertFalse(RelativeEffectFactory.buildRelativeEffect(zeroRate, d_rateEndpoint, TreatmentDefinition.createTrivial(d_fluox), TreatmentDefinition.createTrivial(d_sertr), BasicOddsRatio.class, false).isDefined()); ADDISTestUtil.assertRelativeEffectListEquals(expected, actual); }