public static <T> void checkEquals(Iterator<T> it1, Iterator<T> it2) {
        assertEquals(Utils.toList(it1), Utils.toList(it2));
    }
Checks the two iterables for equality by first converting both to a list.
clients/src/test/java/org/apache/kafka/test/TestUtils.java