Step failedStep = mock(Step.class, "failedStep");
when(failedStep.perform(null)).thenReturn(failed("before stories", new UUIDExceptionWrapper(new RuntimeException("BeforeStories fail"))));
Step pendingStep = mock(Step.class, "pendingStep");
when(pendingStep.perform(null)).thenReturn(pending("pendingStep"));
StepCollector collector = mock(StepCollector.class);
CandidateSteps mySteps = new Steps();
Scenario scenario1 = new Scenario();
List<CandidateSteps> candidateSteps = asList(mySteps);
when(collector.collectBeforeOrAfterStoriesSteps(candidateSteps, Stage.BEFORE)).thenReturn(asList(failedStep));
when(collector.collectScenarioSteps(candidateSteps, scenario1, parameters)).thenReturn(asList(pendingStep));
Story story = new Story(asList(scenario1));