Updated test to work with Hibernate sessionFactory code.