public KafkaConsumer<byte[], byte[]> createConsumerAndSubscribeTo(Map<String, Object> consumerProps, String... topics) {
        KafkaConsumer<byte[], byte[]> consumer = createConsumer(consumerProps);
        consumer.subscribe(Arrays.asList(topics));
        return consumer;
    }
List the latest current offsets for the given {@link Collection} of {@link TopicPartition topic partitions}
@param maxDurationMs the max duration to wait for while fetching metadata from Kafka (in milliseconds)
@param admin the admin client to use for fetching metadata from the Kafka cluster
@param topicPartitions the topic partitions to list end offsets for
@return a {@link Map} containing the latest offset for each requested {@link TopicPartition topic partition}; never null, and never empty
connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedKafkaCluster.java