public OptionalLong lastPollTimeoutMs() {
        long lastTimeoutMs = lastPollTimeout.get();
        if (lastTimeoutMs < 0) {
            return OptionalLong.empty();
        } else {
            return OptionalLong.of(lastTimeoutMs);
        }
    }
Mocked implementation which does not block in {@link #poll(long)}..
raft/src/test/java/org/apache/kafka/raft/MockMessageQueue.java