ScenarioSimulationBuilder { public Simulation createSimulation(Path context, ScenarioSimulationModel.Type type, String value) { switch (type) { case RULE: return ruleSimulationCreationStrategy.createSimulation(context, value); case DMN: return dmnSimulationCreationStrategy.createSimulation(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 createSimulation() throws Exception { Simulation simulationRetrieved = scenarioSimulationBuilder.createSimulation(contextMock, ScenarioSimulationModel.Type.RULE, VALUE); assertNotNull(simulationRetrieved); assertEquals(ruleSimulationMock, simulationRetrieved); simulationRetrieved = scenarioSimulationBuilder.createSimulation(contextMock, ScenarioSimulationModel.Type.DMN, VALUE); assertNotNull(simulationRetrieved); assertEquals(dmnSimulationMock, simulationRetrieved); }