### Question:
SMAAEntityFactory { public static <AltType extends Entity> SMAAModel createSMAAModel(BenefitRiskAnalysis<AltType> brAnalysis) { AbstractBenefitRiskSMAAFactory<AltType> factory = createFactory(brAnalysis); return factory.createSMAAModel(); }  static SMAAModel createSMAAModel(BenefitRiskAnalysis<AltType> brAnalysis); @SuppressWarnings("unchecked") static AbstractBenefitRiskSMAAFactory<AltType> createFactory(BenefitRiskAnalysis<AltType> brAnalysis);  }### Answer:
@Test public void testCreateSmaaModelStudy() { SMAAModel smaaModel = d_smaaFactoryArm.createSMAAModel(); for(OutcomeMeasure om : d_brAnalysisStudy.getCriteria()){ for(Arm d : d_brAnalysisStudy.getAlternatives()){ fi.smaa.jsmaa.model.Measurement actualMeasurement = ((IndependentMeasurements) smaaModel.getMeasurements()).getMeasurement(d_smaaFactoryArm.getCriterion(om), d_smaaFactoryArm.getAlternative(d)); Distribution expDistribution = d_brAnalysisStudy.getMeasurement(om, d); if (om.equals(ExampleData.buildEndpointCgi())) { TransformedStudentTBase expected = (TransformedStudentTBase)expDistribution; GaussianMeasurement actual = (GaussianMeasurement)actualMeasurement; assertEquals(expected.getMu(), actual.getMean(), 0.0000001); assertEquals(expected.getSigma(), actual.getStDev(), 0.0000001); } if (om.equals(ExampleData.buildAdverseEventConvulsion())) { Beta expected = (Beta)expDistribution; BetaMeasurement actual = (BetaMeasurement)actualMeasurement; assertEquals(expected.getAlpha(), actual.getAlpha(), 0.0000001); assertEquals(expected.getBeta(), actual.getBeta(), 0.0000001); } } } }