scenario2, scenario3));
Step step = mock(Step.class);
StepResult result = mock(StepResult.class, "result");
when(step.perform(null)).thenReturn(result);
StoryReporter reporter = mock(ConcurrentStoryReporter.class);
StepCollector collector = mock(StepCollector.class);
FailureStrategy failureStrategy = mock(FailureStrategy.class);
Configuration configuration = configurationWith(reporter, collector, failureStrategy);
configuration.doDryRun(true);
CandidateSteps mySteps = new Steps(configuration);
UUIDExceptionWrapper failure = new UUIDExceptionWrapper(new IllegalArgumentException());
Step successfulStep = mockSuccessfulStep("successfulStep");
Step pendingStep = mock(Step.class, "pendingStep");
Step failingStep = mock(Step.class, "failingStep");
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));
boolean givenStory = false;
givenStoryWithNoBeforeOrAfterSteps(story, givenStory, collector, mySteps);
// When