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