diff --git a/gp2gp-translator/src/test/java/uk/nhs/adaptors/pss/translator/mapper/diagnosticreport/SpecimenBatteryMapperTest.java b/gp2gp-translator/src/test/java/uk/nhs/adaptors/pss/translator/mapper/diagnosticreport/SpecimenBatteryMapperTest.java index 04559b027..5fa87f994 100644 --- a/gp2gp-translator/src/test/java/uk/nhs/adaptors/pss/translator/mapper/diagnosticreport/SpecimenBatteryMapperTest.java +++ b/gp2gp-translator/src/test/java/uk/nhs/adaptors/pss/translator/mapper/diagnosticreport/SpecimenBatteryMapperTest.java @@ -117,10 +117,13 @@ void When_MappingObservationWithAvailabilityTimeInDiagnosticReport_Expect_MoreTh final var ehrExtract = unmarshallEhrExtractFromEhrCompositionXml(ehrCompositionXml); final var batteryCompoundStatements = getBatteryCompoundStatements(ehrExtract); - assertThat(batteryCompoundStatements).map(r -> r.getId().getFirst().getRoot()) - .isEqualTo(List.of("SPECIMEN_CHILD_BATTERY_COMPOUND_STATEMENT_ID_1", - "SPECIMEN_CHILD_BATTERY_COMPOUND_STATEMENT_ID_2", - "SPECIMEN_CHILD_BATTERY_COMPOUND_STATEMENT_ID_3")); + assertThat(batteryCompoundStatements) + .extracting(batteryCompoundStatement -> batteryCompoundStatement.getId().getFirst().getRoot()) + .containsExactly( + "SPECIMEN_CHILD_BATTERY_COMPOUND_STATEMENT_ID_1", + "SPECIMEN_CHILD_BATTERY_COMPOUND_STATEMENT_ID_2", + "SPECIMEN_CHILD_BATTERY_COMPOUND_STATEMENT_ID_3" + ); } @Test void When_MappingObservationWithAvailabilityTimeInBatteryCompoundStatement_Expect_IssuedUsesThisValue() {