Refactor JPA tests