From 860605b3e9395806440a1cd07204767527419b0b Mon Sep 17 00:00:00 2001 From: Mladen Savic Date: Wed, 30 Jun 2021 17:50:17 +0200 Subject: [PATCH] JPA Entities and the Serializable Interface - edit after review --- .../serializable/JPASerializableIntegrationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/persistence-modules/hibernate-jpa/src/test/java/com/baeldung/hibernate/serializable/JPASerializableIntegrationTest.java b/persistence-modules/hibernate-jpa/src/test/java/com/baeldung/hibernate/serializable/JPASerializableIntegrationTest.java index d3b5a6ae7a..5bbb7495d7 100644 --- a/persistence-modules/hibernate-jpa/src/test/java/com/baeldung/hibernate/serializable/JPASerializableIntegrationTest.java +++ b/persistence-modules/hibernate-jpa/src/test/java/com/baeldung/hibernate/serializable/JPASerializableIntegrationTest.java @@ -37,7 +37,7 @@ public class JPASerializableIntegrationTest { entityManager.persist(user); User userDb = entityManager.find(User.class, userId); - assertEquals(userDb.getEmail().getName(), "johndoe"); + assertEquals("johndoe", userDb.getEmail().getName()); } @Test @@ -65,7 +65,7 @@ public void givenAssociation_whenPersisted_thenMultipleAccountsWillBeFoundByEmai List userAccounts = entityManager.createQuery("select a from Account a join fetch a.user where a.user.email = :email") .setParameter("email", email).getResultList(); - assertEquals(userAccounts.size(), 2); + assertEquals(2, userAccounts.size()); } @After