diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index 5c9be671e65..a1b7bb0ae52 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -1029,11 +1029,12 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { mySystemDao.transaction(mySrd, request); // Run a second time (no conditional update) + request = loadResourceFromClasspath(Bundle.class, "/r4/transaction-no-contained.json"); Bundle outcome = mySystemDao.transaction(mySrd, request); ourLog.info("Outcome: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); - IdType communicationId = new IdType(outcome.getEntry().get(0).getResponse().getLocation()); + IdType communicationId = new IdType(outcome.getEntry().get(1).getResponse().getLocation()); Communication communication = myCommunicationDao.read(communicationId, mySrd); assertThat(communication.getSubject().getReference(), matchesPattern("Patient/[0-9]+"));