public List<KeyValue<K, V>> readKeyValuesToList() {
        final List<KeyValue<K, V>> output = new LinkedList<>();
        KeyValue<K, V> outputRow;
        while (!isEmpty()) {
            outputRow = readKeyValue();
            output.add(outputRow);
        }
        return output;
    }
Read all KeyValues from topic to List.

@return List of output KeyValues.
streams/test-utils/src/main/java/org/apache/kafka/streams/TestOutputTopic.java