private static <V> List<V> readValues(final String topic,
                                          final Consumer<Object, V> consumer,
                                          final long waitTime,
                                          final int maxMessages) {
        final List<V> returnList = new ArrayList<>();
        final List<KeyValue<Object, V>> kvs = readKeyValues(topic, consumer, waitTime, maxMessages);
        for (final KeyValue<?, V> kv : kvs) {
            returnList.add(kv.value);
        }
        return returnList;
    }
Returns up to `maxMessages` message-values from the topic.

@param topic          Kafka topic to read messages from
@param consumer       Kafka consumer
@param waitTime       Maximum wait time in milliseconds
@param maxMessages    Maximum number of messages to read via the consumer.
@return The values retrieved via the consumer.
streams/src/test/java/org/apache/kafka/streams/integration/utils/IntegrationTestUtils.java