diff --git a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/creationupdatetimestamp/HibernateCreationUpdateTimestampIntegrationTest.java b/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/creationupdatetimestamp/HibernateCreationUpdateTimestampIntegrationTest.java index bab51dab72..a0f3c1ee97 100644 --- a/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/creationupdatetimestamp/HibernateCreationUpdateTimestampIntegrationTest.java +++ b/persistence-modules/hibernate-annotations/src/test/java/com/baeldung/hibernate/creationupdatetimestamp/HibernateCreationUpdateTimestampIntegrationTest.java @@ -5,7 +5,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import java.text.SimpleDateFormat; import java.time.Instant; +import java.util.Date; import org.h2.Driver; import org.hibernate.Session; @@ -81,7 +83,11 @@ class HibernateCreationUpdateTimestampIntegrationTest { session.getTransaction().commit(); session.close(); - assertEquals(book.getCreatedOn(), book.getLastUpdatedOn()); + Date createdOn = Date.from(book.getCreatedOn()); + Date lastUpdatedOn = Date.from(book.getLastUpdatedOn()); + SimpleDateFormat formatter = new SimpleDateFormat("dd MM yyyy HH:mm:ss"); + + assertEquals(formatter.format(createdOn), formatter.format(lastUpdatedOn)); } @Test diff --git a/persistence-modules/pom.xml b/persistence-modules/pom.xml index 426f49fdfd..0881425a71 100644 --- a/persistence-modules/pom.xml +++ b/persistence-modules/pom.xml @@ -108,6 +108,11 @@ spring-jooq spring-mybatis spring-persistence-simple + + fauna + spring-data-rest + java-mongodb + questdb diff --git a/pom.xml b/pom.xml index 136e43bc89..7d9a8eb21a 100644 --- a/pom.xml +++ b/pom.xml @@ -795,8 +795,6 @@ spring-swagger-codegen/custom-validations-opeanpi-codegen testing-modules/testing-assertions testing-modules/mockito-simple - persistence-modules/fauna - persistence-modules/spring-data-rest rule-engines-modules @@ -924,11 +922,9 @@ vertx-modules xstream webrtc - persistence-modules/java-mongodb messaging-modules - persistence-modules/questdb vaadin libraries-3 web-modules @@ -1058,8 +1054,6 @@ spring-swagger-codegen/custom-validations-opeanpi-codegen testing-modules/testing-assertions testing-modules/mockito-simple - persistence-modules/fauna - persistence-modules/spring-data-rest rule-engines-modules @@ -1187,11 +1181,9 @@ vertx-modules xstream webrtc - persistence-modules/java-mongodb messaging-modules - persistence-modules/questdb vaadin libraries-3 web-modules