Scenario scenario3 = new Scenario("my title 3", asList("successfulStep",
"pendingStep"));
Story story = new Story(new Description("my blurb"), Narrative.EMPTY, asList(scenario1,
scenario2, scenario3));
StoryReporter reporter = mock(ConcurrentStoryReporter.class);
StepCollector collector = mock(StepCollector.class);
CandidateSteps mySteps = new Steps();
UUIDExceptionWrapper failure = new UUIDExceptionWrapper(new IllegalArgumentException());
Step pendingStep = mock(Step.class, "pendingStep");
Step successfulStep = mock(Step.class, "successfulStep");
Step failingStep = mock(Step.class, "failingStep");
when(successfulStep.perform(Matchers.<UUIDExceptionWrapper>any())).thenReturn(successful("successfulStep"));
when(successfulStep.doNotPerform(failure)).thenReturn(notPerformed("successfulStep"));
when(pendingStep.perform(Matchers.<UUIDExceptionWrapper>any())).thenReturn(pending("pendingStep"));
when(pendingStep.doNotPerform(failure)).thenReturn(pending("pendingStep"));
when(failingStep.perform(Matchers.<UUIDExceptionWrapper>any())).thenReturn(failed("failingStep", failure));
when(collector.collectScenarioSteps(asList(mySteps), scenario1, parameters)).thenReturn(
asList(failingStep, successfulStep));
when(collector.collectScenarioSteps(asList(mySteps), scenario2, parameters)).thenReturn(asList(successfulStep));
when(collector.collectScenarioSteps(asList(mySteps), scenario3, parameters)).thenReturn(
asList(successfulStep, pendingStep));
givenStoryWithNoBeforeOrAfterSteps(story, false, collector, mySteps);
// When
FailureStrategy failureStrategy = mock(FailureStrategy.class);