private void compareRecords(List<Record> discoveredRecords,
                                List<ProducerRecord<String, String>> producerRecords,
                                TopicPartition topicPartition) {
        assertThat(discoveredRecords, correspondTo(producerRecords, topicPartition, serde, serde));
    }
Compare the records found in the local tiered storage with the expected records.

@param discoveredRecords The records found in the local tiered storage.
@param producerRecords   The records expected to be found, based on what was sent by the producer.
@param topicPartition    The topic-partition of the records.
storage/src/test/java/org/apache/kafka/tiered/storage/actions/ProduceAction.java