Adapt hibernate for JUnit Test