AbstractScenarioRunner extends Runner { public static ScenarioRunnerProvider getSpecificRunnerProvider(Type type) { if (Type.RULE.equals(type)) { return RuleScenarioRunner::new; } else if (Type.DMN.equals(type)) { return DMNScenarioRunner::new; } else { throw new IllegalArgumentException("Impossible to run simulation of type " + type); } } AbstractScenarioRunner(KieContainer kieContainer,
                                  ScenarioRunnerDTO scenarioRunnerDTO,
                                  ExpressionEvaluatorFactory expressionEvaluatorFactory); static Description getDescriptionForSimulation(Optional<String> className, List<ScenarioWithIndex> scenarios); static Description getDescriptionForScenario(Optional<String> className, int index, Scenario scenario); static ScenarioRunnerProvider getSpecificRunnerProvider(Type type); @Override void run(RunNotifier notifier); @Override Description getDescription(); Optional<String> getFileName(); ClassLoader getClassLoader(); KieContainer getKieContainer(); Optional<SimulationRunMetadata> getLastRunResultMetadata();  }
@Test public void getSpecificRunnerProvider() { for (ScenarioSimulationModel.Type value : ScenarioSimulationModel.Type.values()) { final ScenarioRunnerProvider retrieved = AbstractScenarioRunner.getSpecificRunnerProvider(value); assertNotNull(retrieved); } }
@Test(expected = IllegalArgumentException.class) public void getSpecificRunnerProviderNullType() { settingsLocal.setType(null); AbstractScenarioRunner.getSpecificRunnerProvider(null); }