@akolodziejski please use hamcrest matchers. They are much nicer. You would write something like assertThat(patientIdentifiers, containsInAnyOrder(hasIdentifier("101"), hasIdentifier("101-6"))); where hasIdentifier returns your own matcher. Let me know if you have any questions.