Hebert Coelho wrote:I have an application that we test it with the database, HSQLDB.
I think it is a better approach because you do not need to mock anything. Maybe this will help you to have an idea.JUnit with HSQLDB, JPA and Hibernate
It appears anywhere the parent mapping element defines a join to a new table that references the primary key of the original table