private static void assertListEquals(List<TopicIdPartition> expected, List<TopicIdPartition> actual) {
        for (TopicIdPartition expectedPart : expected) {
            if (!actual.contains(expectedPart)) {
                fail("Failed to find expected partition " + expectedPart);
            }
        }
        for (TopicIdPartition actualPart : actual) {
            if (!expected.contains(actualPart)) {
                fail("Found unexpected partition " + actualPart);
            }
        }
    }
Create a set of TopicPartitions.  We use a TreeSet, in order to get a deterministic
ordering for test purposes.
clients/src/test/java/org/apache/kafka/clients/FetchSessionHandlerTest.java