Use to match two collections of elements in any order. Groovy def list = [ new Person("id1", 3, 12), new Person("id1", 4, 10), new Person("id2", 4, 20) ] actual(list).should(containExactly( [id: "id2", level: 4, monthsAtCompany: 20], [id: "id1", level: 8, monthsAtCompany: 10], [id: "id1", level: 7, monthsAtCompany: 12])) Check matchers/import-and-dependencies Import And Dependencies for prerequisites. Java List<?> list = list( new Person("id1", 3, 12), new Person("id1", 4, 10), new Person("id2", 4, 20)); actual(list).should(containExactly( map("id", "id2", "level", 4, "monthsAtCompany", 20), map("id", "id1", "level", 8, "monthsAtCompany", 10), map("id", "id1", "level", 7, "monthsAtCompany", 12))); Check matchers/import-and-dependencies Import And Dependencies for prerequisites. Console output displays potential mismatches to help with investigation: X failed expecting [value] to contain exactly [ {"id": "id2", "level": 4, "monthsAtCompany": 20}, {"id": "id1", "level": 8, "monthsAtCompany": 10}, {"id": "id1", "level": 7, "monthsAtCompany": 12} ]: no matches found for: [{"id": "id1", "level": 8, "monthsAtCompany": 10}, {"id": "id1", "level": 7, "monthsAtCompany": 12}] possible mismatches: [value][1].level: actual: 4 <java.lang.Integer> expected: 8 <java.lang.Integer> [value][0].level: actual: 3 <java.lang.Integer> expected: 7 <java.lang.Integer> (3ms) [ {"id": "id1", "level": **3**, "monthsAtCompany": 12}, {"id": "id1", "level": **4**, "monthsAtCompany": 10}, {"id": "id2", "level": 4, "monthsAtCompany": 20} ] Note: If you have a clear key column(s) defined, consider using TableData as matchers/java-beans-and-records#java-beans-equal-table-data expected values