public static <K, V> List<KeyValue<K, V>> waitUntilFinalKeyValueRecordsReceived(final Properties consumerConfig,
                                                                                    final String topic,
                                                                                    final List<KeyValue<K, V>> expectedRecords) throws Exception {
        return waitUntilFinalKeyValueRecordsReceived(consumerConfig, topic, expectedRecords, DEFAULT_TIMEOUT);
    }
Wait until final key-value mappings have been consumed.
Duplicate records are not considered in the comparison.

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