private void assertNoRevocations() {
        returnedAssignments.newlyRevokedConnectors().forEach((worker, revocations) ->
                assertEquals(
                    Collections.emptySet(),
                    new HashSet<>(revocations),
                    "Expected no revocations to take place during this round, but connector revocations were issued for worker " + worker
                                )
        );
        returnedAssignments.newlyRevokedTasks().forEach((worker, revocations) ->
                assertEquals(
                    Collections.emptySet(),
                    new HashSet<>(revocations),
                    "Expected no revocations to take place during this round, but task revocations were issued for worker " + worker
                                )
        );
    }
Assert that the task counts for each worker in the cluster match the expected counts.
For example, calling {@code assertTaskAllocations(0, 0, 2, 3)} ensures that there are two
workers in the cluster that are assigned no tasks, one worker that is assigned two tasks,
and one worker that is assigned three tasks.
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignorTest.java