### Question:
MetaBenefitRiskAnalysis extends BenefitRiskAnalysis<TreatmentDefinition> { public Distribution getMeasurement(OutcomeMeasure om, TreatmentDefinition d) { if (om.getVariableType() instanceof RateVariableType) { GaussianBase logOdds = getAbsoluteEffectDistribution(d, om); return logOdds == null ? null : new LogitGaussian(logOdds.getMu(), logOdds.getSigma()); } return getAbsoluteEffectDistribution(d, om); } MetaBenefitRiskAnalysis(String name, Indication indication, List<MetaAnalysis> metaAnalyses,
			TreatmentDefinition baseline, List<TreatmentDefinition> alternatives, AnalysisType analysisType);  MetaBenefitRiskAnalysis(String name, Indication indication, List<MetaAnalysis> metaAnalyses,
			TreatmentDefinition baseline, List<TreatmentDefinition> alternatives, AnalysisType analysisType, DecisionContext context); Indication getIndication(); List<OutcomeMeasure> getCriteria(); List<MetaAnalysis> getMetaAnalyses(); ObservableList<TreatmentDefinition> getAlternatives(); @Override Set<? extends Entity> getDependencies(); @Override boolean deepEquals(Entity other); @Override String toString(); TreatmentDefinition getBaseline(); GaussianBase getRelativeEffectDistribution(OutcomeMeasure om, TreatmentDefinition subject); MultivariateNormalSummary getRelativeEffectsSummary(OutcomeMeasure om); Distribution getMeasurement(OutcomeMeasure om, TreatmentDefinition d); GaussianBase getBaselineDistribution(OutcomeMeasure om); MCMCModelWrapper getBaselineModel(OutcomeMeasure om); void runAllConsistencyModels(); List<Task> getNetworkTasks(); AnalysisType getAnalysisType(); List<Summary> getAbsoluteEffectSummaries(); List<TreatmentDefinition> getNonBaselineAlternatives(); MeasurementSource<TreatmentDefinition> getMeasurementSource(); DecisionContext getDecisionContext(); static String PROPERTY_ALTERNATIVES; static String PROPERTY_BASELINE; static String PROPERTY_METAANALYSES; }### Answer:
@Test public void testGetMeasurement() { OutcomeMeasure om = ExampleData.buildEndpointHamd(); Drug fluox = ExampleData.buildDrugFluoxetine(); Drug parox = ExampleData.buildDrugParoxetine(); LogGaussian baseline = (LogGaussian)d_BRAnalysis.getBaselineDistribution(om); LogGaussian relative = (LogGaussian)d_BRAnalysis.getRelativeEffectDistribution(om, TreatmentDefinition.createTrivial(fluox)); double expectedMu = baseline.getMu() + relative.getMu(); double expectedSigma = Math.sqrt(Math.pow(baseline.getSigma(), 2) + Math.pow(relative.getSigma(), 2)); LogitGaussian absoluteF = (LogitGaussian)d_BRAnalysis.getMeasurement(om, TreatmentDefinition.createTrivial(fluox)); assertEquals(expectedMu, absoluteF.getMu(), 0.0000001); assertEquals(expectedSigma, absoluteF.getSigma(), 0.0000001); LogitGaussian absoluteP = (LogitGaussian)d_BRAnalysis.getMeasurement(om, TreatmentDefinition.createTrivial(parox)); assertEquals(baseline.getMu(), absoluteP.getMu(), 0.0000001); assertEquals(baseline.getSigma(), absoluteP.getSigma(), 0.0001); }