Change pom to use java version 7
refactor Hibernate Tests