private void assertObservedRecords(Map<String, Long> observedRecords, Map<String, Long> expectedRecordCounts) throws InterruptedException {
        waitForCondition(() -> expectedRecordCounts.equals(observedRecords),
            OBSERVED_RECORDS_DURATION_MS,
            () -> "The observed records should be " + expectedRecordCounts + " but was " + observedRecords);
    }
Test the {@link Filter} transformer with a
{@link TopicNameMatches} predicate on a sink connector.
connect/runtime/src/test/java/org/apache/kafka/connect/integration/TransformationIntegrationTest.java