From 49124c298df5e8af0ea20ac4fc88f2b3156f9b8f Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Thu, 2 Sep 2021 13:15:24 -0400 Subject: [PATCH] issue-2901 fixing test --- .../dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java index 870543bdced..fa953bc28e6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoCreatePlaceholdersR4Test.java @@ -114,15 +114,10 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test { o.setStatus(ObservationStatus.FINAL); o.getSubject().setReference("Patient/FOO"); - Assertions.assertThrows(InvalidRequestException.class, () -> { + Exception ex = Assertions.assertThrows(InvalidRequestException.class, () -> { myObservationDao.update(o, mySrd); }); -// try { -// -// fail(); -// } catch (InvalidRequestException e) { -// assertThat(e.getMessage(), startsWith("Resource Patient/FOO not found, specified in path: Observation.subject")); -// } + assertThat(ex.getMessage(), startsWith("Resource Patient/FOO not found, specified in path: Observation.subject")); } @Test