### Question:
StudyBenefitRiskAnalysis extends BenefitRiskAnalysis<Arm> { public ObservableList<Arm> getArms() { return d_alternatives; } StudyBenefitRiskAnalysis(String name, Indication indication, Study study, 
			List<OutcomeMeasure> criteria, List<Arm> alternatives, AnalysisType analysisType);  StudyBenefitRiskAnalysis(String name, Indication indication, Study study, 
			List<OutcomeMeasure> criteria, Arm baseline, List<Arm> alternatives, AnalysisType analysisType);  StudyBenefitRiskAnalysis(String name, Indication indication, Study study,
			List<OutcomeMeasure> criteria, Arm baseline, List<Arm> alternatives,
			AnalysisType analysisType, DecisionContext context); @Override Set<? extends Entity> getDependencies(); ObservableList<Arm> getArms(); ObservableList<Arm> getAlternatives(); Indication getIndication(); Distribution getMeasurement(OutcomeMeasure criterion, Arm alternative); List<OutcomeMeasure> getCriteria(); Study getStudy(); @Override String toString(); MeasurementSource<Arm> getMeasurementSource(); AnalysisType getAnalysisType(); @Override boolean deepEquals(Entity other); Arm getBaseline(); DecisionContext getDecisionContext(); Distribution getRelativeEffectDistribution(OutcomeMeasure om, Arm subject); @Override List<Arm> getNonBaselineAlternatives(); static String PROPERTY_STUDY; static String PROPERTY_ARMS; }### Answer:
@Test(expected=IllegalArgumentException.class) public void testBadInitialization() { List<OutcomeMeasure> criteria = new ArrayList<OutcomeMeasure>(); criteria.add(ExampleData.buildEndpointHamd()); criteria.add(ExampleData.buildAdverseEventConvulsion()); criteria.add(ExampleData.buildAdverseEventSexualDysfunction()); new StudyBenefitRiskAnalysis("Test SBA", ExampleData.buildIndicationDepression(), ExampleData.buildStudyFava2002(), criteria, ExampleData.buildStudyFava2002().getArms(), AnalysisType.SMAA); }
@Test public void testLyndOBrienException() throws IllegalArgumentException { Indication indication = ExampleData.buildIndicationDepression(); Study study = ExampleData.buildStudyChouinard(); List<OutcomeMeasure> criteria = new ArrayList<OutcomeMeasure>(); criteria.add(ExampleData.buildEndpointHamd()); criteria.add(ExampleData.buildAdverseEventConvulsion()); List<Arm> alternatives = new ArrayList<Arm>(); alternatives.add(study.getArms().get(0)); boolean caught = false; try { new StudyBenefitRiskAnalysis(NAME, indication, study, criteria, alternatives, AnalysisType.LyndOBrien); } catch(IllegalArgumentException e) { caught = true;} assertTrue(caught); }