ScenarioSimulationBuilder { public Settings createSettings(Path context, ScenarioSimulationModel.Type type, String value) { switch (type) { case RULE: return ruleSimulationCreationStrategy.createSettings(context,value); case DMN: return dmnSimulationCreationStrategy.createSettings( context,value); default: throw new IllegalStateException("Unknown ScenarioSimulationModel.Type " + type); } }  Simulation createSimulation(Path context, ScenarioSimulationModel.Type type, String value); Background createBackground(Path context, ScenarioSimulationModel.Type type, String value); Settings createSettings(Path context, ScenarioSimulationModel.Type type, String value);  }
@Test public void createSettings() throws Exception { Settings settingsRetrieved = scenarioSimulationBuilder.createSettings(contextMock, ScenarioSimulationModel.Type.RULE, VALUE); assertNotNull(settingsRetrieved); assertEquals(ruleSettingsMock, settingsRetrieved); settingsRetrieved = scenarioSimulationBuilder.createSettings(contextMock, ScenarioSimulationModel.Type.DMN, VALUE); assertNotNull(settingsRetrieved); assertEquals(dmnSettingsMock, settingsRetrieved); }