From f7187fbc0ad522ac427a4d528387789ff3886918 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Sat, 11 Feb 2017 19:39:01 -0500 Subject: [PATCH] Fix another test --- .../jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java index 7673c4a24a0..a095433946d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java @@ -24,6 +24,7 @@ import ca.uhn.fhir.rest.server.EncodingEnum; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.exceptions.ResourceVersionConflictException; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.TestUtil; public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test { @@ -186,7 +187,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test { try { myPatientDao.validate(pat, null, null, null, ValidationModeEnum.CREATE, null, mySrd); fail(); - } catch (InvalidRequestException e) { + } catch (UnprocessableEntityException e) { assertThat(e.getMessage(), containsString("ID must not be populated")); } @@ -209,7 +210,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test { try { myPatientDao.validate(pat, null, null, null, ValidationModeEnum.UPDATE, null, mySrd); fail(); - } catch (InvalidRequestException e) { + } catch (UnprocessableEntityException e) { assertThat(e.getMessage(), containsString("ID must be populated")); } @@ -232,7 +233,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test { try { myPatientDao.validate(pat, null, null, null, ValidationModeEnum.UPDATE, null, mySrd); fail(); - } catch (InvalidRequestException e) { + } catch (UnprocessableEntityException e) { assertThat(e.getMessage(), containsString("ID must be populated")); }