public KafkaFuture<Void> all() {
        final KafkaFutureImpl<Void> result = new KafkaFutureImpl<>();

        this.future.whenComplete((topicPartitions, throwable) -> {
            if (throwable != null) {
                result.completeExceptionally(throwable);
            } else {
                for (TopicPartition partition : partitions) {
                    if (maybeCompleteExceptionally(topicPartitions, partition, result)) {
                        return;
                    }
                }
                result.complete(null);
            }
        });
        return result;
    }
@Test
    public void testTopLevelErrorConstructor() throws InterruptedException {
        partitionFutures.completeExceptionally(Errors.GROUP_AUTHORIZATION_FAILED.exception());
        DeleteConsumerGroupOffsetsResult topLevelErrorResult =
            new DeleteConsumerGroupOffsetsResult(partitionFutures, partitions);
        TestUtils.assertFutureError(topLevelErrorResult.all(), GroupAuthorizationException.class);
    }