The test also fails in Hibernate 4. I'm attaching the updated test that runs with Hibernate 4 right now.