Session session = persistenceService.getSession();
persistenceService.setRollbackOnly();
assertNotNull(persistenceService.transaction);
assertSame(session, persistenceService.session);
Recorded recordedConnection = (Recorded)connection;
List invocations = recordedConnection.getInvocations();
assertNull(Invocation.getInvocation(invocations, "commit", 0));
assertNull(Invocation.getInvocation(invocations, "rollback", 0));
persistenceService.close();
invocations = recordedConnection.getInvocations();
assertNull(Invocation.getInvocation(invocations, "commit", 0));
assertNotNull(Invocation.getInvocation(invocations, "rollback", 0));
}