private void runScenarioSteps( RunContext context, Scenario scenario, Map<String, String> scenarioParameters) throws InterruptedException { boolean restart = true; while (restart) { restart = false; List<Step> steps = context.collectScenarioSteps(scenario, scenarioParameters); try { runStepsWhileKeepingState(context, steps); } catch (RestartingScenarioFailure e) { restart = true; continue; } generatePendingStepMethods(context, steps); } }