<K, V> TestRecord<K, V> readRecord(final String topic,
                                       final Deserializer<K> keyDeserializer,
                                       final Deserializer<V> valueDeserializer) {
        final Queue<? extends ProducerRecord<byte[], byte[]>> outputRecords = getRecordsQueue(topic);
        if (outputRecords == null) {
            throw new NoSuchElementException("Uninitialized topic: " + topic);
        }
        final ProducerRecord<byte[], byte[]> record = outputRecords.poll();
        if (record == null) {
            throw new NoSuchElementException("Empty topic: " + topic);
        }
        final K key = keyDeserializer.deserialize(record.topic(), record.headers(), record.key());
        final V value = valueDeserializer.deserialize(record.topic(), record.headers(), record.value());
        return new TestRecord<>(key, value, record.headers(), record.timestamp());
    }
Get all the names of all the topics to which records have been produced during the test run.
<p>
Call this method after piping the input into the test driver to retrieve the full set of topic names the topology
produced records to.
<p>
The returned set of topic names may include user (e.g., output) and internal (e.g., changelog, repartition) topic
names.

@return the set of topic names the topology has produced to
streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java