public static <K, V> List<KeyValue<K, V>> waitUntilMinKeyValueRecordsReceived(final Properties consumerConfig,
                                                                                  final String topic,
                                                                                  final int expectedNumRecords) throws Exception {
        return waitUntilMinKeyValueRecordsReceived(consumerConfig, topic, expectedNumRecords, DEFAULT_TIMEOUT);
    }
Wait until enough data (key-value records) has been consumed.

@param consumerConfig      Kafka Consumer configuration
@param topic               Kafka topic to consume from
@param expectedNumRecords  Minimum number of expected records
@param <K>                 Key type of the data records
@param <V>                 Value type of the data records
@return All the records consumed, or null if no records are consumed
streams/src/test/java/org/apache/kafka/streams/integration/utils/IntegrationTestUtils.java