public void testUserSuppliedSessionWithRollback() throws Exception {
DataSource dataSource = Jdbc.createRecordedDataSource();
Connection connection = dataSource.getConnection();
DbPersistenceServiceFactory persistenceServiceFactory = new DbPersistenceServiceFactory();
SessionFactory sessionFactory = persistenceServiceFactory.getSessionFactory();
DbPersistenceService persistenceService = (DbPersistenceService) persistenceServiceFactory.openService();
Session session = sessionFactory.openSession(connection);
persistenceService.setSession(session);
persistenceService.setRollbackOnly();
persistenceService.getSession();
assertNull(persistenceService.transaction);