test using jpa for database