private void updateFetchPosition(TopicPartition tp) {
        if (subscriptions.isOffsetResetNeeded(tp)) {
            resetOffsetPosition(tp);
        } else if (!committed.containsKey(tp)) {
            subscriptions.requestOffsetReset(tp);
            resetOffsetPosition(tp);
        } else {
            subscriptions.seek(tp, committed.get(tp).offset());
        }
    }
Schedule a task to be executed during a poll(). One enqueued task will be executed per {@link #poll(Duration)}
invocation. You can use this repeatedly to mock out multiple responses to poll invocations.
@param task the task to be executed
clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java