public static ListConsumerGroupOffsetsResult listConsumerGroupOffsetsResult(Map<String, Map<TopicPartition, OffsetAndMetadata>> offsets) {
        Map<CoordinatorKey, KafkaFuture<Map<TopicPartition, OffsetAndMetadata>>> resultMap = offsets.entrySet().stream()
            .collect(Collectors.toMap(e -> CoordinatorKey.byGroupId(e.getKey()),
                                      e -> KafkaFutureImpl.completedFuture(e.getValue())));
        return new ListConsumerGroupOffsetsResult(resultMap);
    }
Helper to create a DescribeTopicsResult instance for a given topic.
DescribeTopicsResult's constructor is only accessible from within the
admin package.
clients/src/test/java/org/apache/kafka/clients/admin/AdminClientTestUtils.java