public void testExceptionThrown() {
assertEquals("Table should only have one row", 1, getCount());
MockRequestContext context = new MockRequestContext();
MockFlowSession flowSession = new MockFlowSession();
flowSession.getDefinition().getAttributes().put("persistenceContext", "true");
hibernateListener.sessionStarting(context, flowSession, null);
context.setActiveSession(flowSession);
assertSessionBound();
TestBean bean1 = new TestBean("Keith Donald");
hibernate.templateSave(bean1);
assertEquals("Table should still only have one row", 1, getCount());
hibernateListener.exceptionThrown(context, new FlowExecutionException("bla", "bla", "bla"));
assertEquals("Table should still only have one row", 1, getCount());
assertSessionNotBound();
}