assertIsPending(executableSteps.get(3), andWhenPendingStep, whenPendingStep);
}
private void assertIsPending(Step step, String stepAsString, String previousNonAndStep) {
assertThat(step, instanceOf(PendingStep.class));
PendingStep pendingStep = (PendingStep) step;
assertThat(pendingStep.stepAsString(), equalTo(stepAsString));
assertThat(pendingStep.previousNonAndStepAsString(), equalTo(previousNonAndStep));
Throwable throwable = step.perform(null).getFailure();
assertThat(throwable, instanceOf(PendingStepFound.class));
assertThat(throwable.getMessage(), equalTo(stepAsString));
}