Java code for testing JPA purposes