public void testUserSuppliedSession() throws Exception {
DbPersistenceServiceFactory persistenceServiceFactory = new DbPersistenceServiceFactory();
SessionFactory sessionFactory = persistenceServiceFactory.getSessionFactory();
DbPersistenceService persistenceService = (DbPersistenceService) persistenceServiceFactory.openService();
Session session = sessionFactory.openSession();
persistenceService.setSession(session);
persistenceService.getSession();
assertNull(persistenceService.transaction);
persistenceService.close();