public synchronized boolean errorNext(RuntimeException e) {
        Completion completion = this.completions.pollFirst();
        if (completion != null) {
            completion.complete(e);
            return true;
        } else {
            return false;
        }
    }
Complete the earliest uncompleted call with the given error.

@return true if there was an uncompleted call to complete
clients/src/main/java/org/apache/kafka/clients/producer/MockProducer.java