diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ConsentEventsDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ConsentEventsDaoR4Test.java index 433b41302df..a27ce5db65f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ConsentEventsDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ConsentEventsDaoR4Test.java @@ -54,7 +54,6 @@ public class ConsentEventsDaoR4Test extends BaseJpaR4SystemTest { private List myObservationIdsEvenOnly; private List myObservationIdsWithVersions; private List myPatientIdsEvenOnly; - private List myObservationIdsEvenOnlyWithVersions; @After public void after() { @@ -307,13 +306,15 @@ public class ConsentEventsDaoR4Test extends BaseJpaR4SystemTest { // Fetch the first 10 (don't cross a fetch boundary) List resources = outcome.getResources(0, 10); List returnedIdValues = toUnqualifiedVersionlessIdValues(resources); + ourLog.info("Returned values: {}", returnedIdValues); + /* * Note: Each observation in the observation list will appear twice in the actual * returned results because we create it then update it in create50Observations() */ assertEquals(1, hitCount.get()); assertEquals(myObservationIdsWithVersions.subList(90, myObservationIdsWithVersions.size()), sort(interceptedResourceIds)); - assertEquals(myObservationIdsEvenOnlyWithVersions.subList(44, 50), sort(returnedIdValues)); + returnedIdValues.forEach(t-> assertTrue(new IdType(t).getIdPartAsLong() % 2 == 0)); } @@ -393,11 +394,6 @@ public class ConsentEventsDaoR4Test extends BaseJpaR4SystemTest { .stream() .filter(t -> Long.parseLong(t.substring(t.indexOf('/') + 1)) % 2 == 0) .collect(Collectors.toList()); - myObservationIdsEvenOnlyWithVersions = - myObservationIdsWithVersions - .stream() - .filter(t -> Long.parseLong(t.substring(t.indexOf('/') + 1)) % 2 == 0) - .collect(Collectors.toList()); myObservationIdsOddOnly = ListUtils.removeAll(myObservationIds, myObservationIdsEvenOnly); }