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

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