diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java index 1593dce462e..d7cd4a94045 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java @@ -485,11 +485,12 @@ public class FhirResourceDaoDstu3SearchFtTest extends BaseJpaDstu3Test { map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("NAMEAAA")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + String[] idArray = toValues(pId1); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(idArray)); map = new SearchParameterMap(); map.add(Constants.PARAM_TEXT, new StringParam("DIVAAA")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(idArray)); /* * Update but don't reindex @@ -503,10 +504,10 @@ public class FhirResourceDaoDstu3SearchFtTest extends BaseJpaDstu3Test { map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("NAMEAAA")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(idArray)); map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("NAMEBBB")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), not(contains(toValues(pId1)))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), not(contains(idArray))); myPatientDao.update(patient, null, true, mockSrd()); @@ -516,15 +517,15 @@ public class FhirResourceDaoDstu3SearchFtTest extends BaseJpaDstu3Test { map = new SearchParameterMap(); map.add(Patient.SP_NAME, new StringParam("NAMEBBB")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(idArray)); map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("NAMEBBB")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(idArray)); map = new SearchParameterMap(); map.add(Constants.PARAM_TEXT, new StringParam("DIVBBB")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(idArray)); } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java index f199da602fb..18da24565a4 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java @@ -496,11 +496,12 @@ public class FhirResourceDaoR4SearchFtTest extends BaseJpaR4Test { map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("NAMEAAA")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + String[] pidTypeArray = toValues(pId1); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(pidTypeArray)); map = new SearchParameterMap(); map.add(Constants.PARAM_TEXT, new StringParam("DIVAAA")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(pidTypeArray)); /* * Update but don't reindex @@ -514,10 +515,10 @@ public class FhirResourceDaoR4SearchFtTest extends BaseJpaR4Test { map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("NAMEAAA")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(pidTypeArray)); map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("NAMEBBB")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), not(contains(toValues(pId1)))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), not(contains(pidTypeArray))); myPatientDao.update(patient, null, true, mockSrd()); @@ -527,15 +528,15 @@ public class FhirResourceDaoR4SearchFtTest extends BaseJpaR4Test { map = new SearchParameterMap(); map.add(Patient.SP_NAME, new StringParam("NAMEBBB")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(pidTypeArray)); map = new SearchParameterMap(); map.add(Constants.PARAM_CONTENT, new StringParam("NAMEBBB")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(pidTypeArray)); map = new SearchParameterMap(); map.add(Constants.PARAM_TEXT, new StringParam("DIVBBB")); - assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(toValues(pId1))); + assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(map)), contains(pidTypeArray)); }