public void completeIfEmpty() {
            if (remainingResults.get() == 0) {
                future.ifPresent(future -> future.complete(result));
            }
        }
Handles the case where there are no results pending after initialization.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java