public KafkaFuture<Void> all() {
        final KafkaFutureImpl<Void> result = new KafkaFutureImpl<>();
        this.future.whenComplete((memberErrors, throwable) -> {
            if (throwable != null) {
                result.completeExceptionally(throwable);
            } else {
                if (removeAll()) {
                    for (Map.Entry<MemberIdentity, Errors> entry: memberErrors.entrySet()) {
                        Exception exception = entry.getValue().exception();
                        if (exception != null) {
                            Throwable ex = new KafkaException("Encounter exception when trying to remove: "
                                    + entry.getKey(), exception);
                            result.completeExceptionally(ex);
                            return;
                        }
                    }
                } else {
                    for (MemberToRemove memberToRemove : memberInfos) {
                        if (maybeCompleteExceptionally(memberErrors, memberToRemove.toMemberIdentity(), result)) {
                            return;
                        }
                    }
                }
                result.complete(null);
            }
        });
        return result;
    }
@Test
    public void testTopLevelErrorConstructor() throws InterruptedException {
        memberFutures.completeExceptionally(Errors.GROUP_AUTHORIZATION_FAILED.exception());
        RemoveMembersFromConsumerGroupResult topLevelErrorResult =
            new RemoveMembersFromConsumerGroupResult(memberFutures, membersToRemove);
        TestUtils.assertFutureError(topLevelErrorResult.all(), GroupAuthorizationException.class);
    }