Hibernate tests refactoring