JPAUnit - Making JPA Testing Easier

JPAUnit is a library for placing your database in a known state before running your JPA tests. It has been designed to use the work you have already performed creating your domain model and the mapping to database tables done in your Java Persistence Entity classes.

By allowing users to defined their data in XML files that will be loaded before a test and removed at the end of a test, the library greatly eases the testing of JPA code. It will allow users to verify their JQL and Criteria API queries for correctness.

The JPAUnit project is hosted on github

JPAUnit Maven Dependency

To start using JPAUnit simply add this dependency to your pom.xml. A brief how-to can be found on Github