public static CreatePartitionsResult createPartitionsResult(String topic, Throwable t) {
        KafkaFutureImpl<Void> future = new KafkaFutureImpl<>();
        future.completeExceptionally(t);
        return new CreatePartitionsResult(Collections.singletonMap(topic, future));
    }
Helper to create a CreatePartitionsResult instance for a given Throwable.
CreatePartitionsResult's constructor is only accessible from within the
admin package.
clients/src/test/java/org/apache/kafka/clients/admin/AdminClientTestUtils.java