public static void assertAssignment(
        Map<String, Map<Uuid, Set<Integer>>> expectedAssignment,
        GroupAssignment computedGroupAssignment
    ) {
        assertEquals(expectedAssignment.size(), computedGroupAssignment.members().size());
        computedGroupAssignment.members().forEach((memberId, memberAssignment) -> {
            Map<Uuid, Set<Integer>> computedAssignmentForMember = memberAssignment.partitions();
            assertEquals(expectedAssignment.get(memberId), computedAssignmentForMember);
        });
    }
Verifies that the expected assignment is equal to the computed assignment for every member in the group.
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/AssignmentTestUtil.java