I'm researching the means of unit testing a Spring Webflow. The webflow under test has multiple end states. Is there a way to determine, through which of those end states did the workflow exit?
My current code is:
@Test
public void flow_ends_on_cancel_from_start_state() {
startFlow(context);
context.setEventId("cancel");
resumeFlow(context);
assertFlowExecutionEnded();
}
I tried asserting for the current state being equal to the id of the end state in question, but the assertion was failing because the workflow had already terminated.
Any advice?