public synchronized List<ProducerRecord<K, V>> uncommittedRecords() {
        return new ArrayList<>(this.uncommittedSends);
    }
Get the list of sent records since the last call to {@link #clear()}
clients/src/main/java/org/apache/kafka/clients/producer/MockProducer.java