public static <T> Set<T> toSet(Collection<T> collection) {
        return new HashSet<>(collection);
    }
Checks the two iterables for equality by first converting both to a list.
clients/src/test/java/org/apache/kafka/test/TestUtils.java