From 74e67d6ce9b520ca379a60b592d13a484b31ce07 Mon Sep 17 00:00:00 2001 From: Buddhini Samarakkody Date: Thu, 24 Aug 2017 07:41:01 +0530 Subject: [PATCH] Fix the test method (#2491) * Remove assertion before persist in test1 * Add back assertion after persist --- .../HibernateManyToManyAnnotationMainIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-hibernate5/src/test/java/com/baeldung/hibernate/manytomany/HibernateManyToManyAnnotationMainIntegrationTest.java b/spring-hibernate5/src/test/java/com/baeldung/hibernate/manytomany/HibernateManyToManyAnnotationMainIntegrationTest.java index 2ec1246961..9a536a0f80 100644 --- a/spring-hibernate5/src/test/java/com/baeldung/hibernate/manytomany/HibernateManyToManyAnnotationMainIntegrationTest.java +++ b/spring-hibernate5/src/test/java/com/baeldung/hibernate/manytomany/HibernateManyToManyAnnotationMainIntegrationTest.java @@ -47,8 +47,8 @@ public class HibernateManyToManyAnnotationMainIntegrationTest { Employee employee = new Employee(emp.split(" ")[0], emp.split(" ")[1]); assertEquals(0, employee.getProjects().size()); employee.setProjects(projects); - assertNotNull(employee); session.persist(employee); + assertNotNull(employee); } }