public static Cluster singletonCluster(final String topic, final int partitions) {
        return clusterWith(1, topic, partitions);
    }
Helper functions for writing unit tests
clients/src/test/java/org/apache/kafka/test/TestUtils.java