CAUSEWAY-3627 - updates to 2.0.0-RC4 (jpa)
diff --git a/module-simple-tests/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjects_IntegTest.java b/module-simple-tests/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjects_IntegTest.java
index ad6e86f..0309406 100644
--- a/module-simple-tests/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjects_IntegTest.java
+++ b/module-simple-tests/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjects_IntegTest.java
@@ -5,6 +5,7 @@
import javax.inject.Inject;
import javax.persistence.RollbackException;
+import org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException;
import org.hamcrest.MatcherAssert;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
@@ -13,7 +14,6 @@
import static org.junit.jupiter.api.Assertions.assertThrows;
import org.springframework.dao.DuplicateKeyException;
-import org.springframework.transaction.TransactionSystemException;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@@ -102,8 +102,8 @@ public void whenAlreadyExists() {
assertThat(attempt.isFailure()).isTrue();
val failureIfAny = attempt.getFailure();
assertThat(failureIfAny).isPresent();
- assertThat(failureIfAny.get()).isInstanceOf(TransactionSystemException.class);
- assertThat(failureIfAny.get().getCause()).isInstanceOf(RollbackException.class);
+ assertThat(failureIfAny.get()).isInstanceOf(DuplicateKeyException.class);
+ assertThat(failureIfAny.get().getCause()).isInstanceOf(JdbcSQLIntegrityConstraintViolationException.class);
}