public void record(int batchSize) {
        if (recordsRemainingLatch != null) {
            IntStream.range(0, batchSize).forEach(i -> recordsRemainingLatch.countDown());
        }
    }
Record arrival of a batch of messages at the connector.

@param batchSize the number of messages
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectorHandle.java