public synchronized void clear() {
        this.sent.clear();
        this.uncommittedSends.clear();
        this.sentOffsets = false;
        this.completions.clear();
        this.consumerGroupOffsets.clear();
        this.uncommittedConsumerGroupOffsets.clear();
    }
Clear the stored history of sent records, consumer group offsets
clients/src/main/java/org/apache/kafka/clients/producer/MockProducer.java