@Override
    public synchronized void commitAsync(Map<TopicPartition, OffsetAndMetadata> offsets, OffsetCommitCallback callback) {
        ensureNotClosed();
        committed.putAll(offsets);
        if (callback != null) {
            callback.onComplete(offsets, null);
        }
    }
@deprecated Use {@link #setPollException(KafkaException)} instead
clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java