public void testFlowStateExceptionHandlingTransition() {
new EndState(flow, "end");
TransitionExecutingFlowExecutionExceptionHandler handler = new TransitionExecutingFlowExecutionExceptionHandler();
handler.add(TestException.class, "end");
flow.getExceptionHandlerSet().add(handler);
FlowExecutionListener listener = new FlowExecutionListenerAdapter() {
@SuppressWarnings("unused")
public void sessionEnding(RequestContext context, FlowSession session, MutableAttributeMap<?> output) {
assertTrue(context.getFlashScope().contains("flowExecutionException"));
assertTrue(context.getFlashScope().contains("rootCauseException"));
assertTrue(context.getFlashScope().get("rootCauseException") instanceof TestException);