boolean pollTimeoutExpired(long now) {
        update(now);
        return pollTimer.isExpired();
    }
@Test
    public void testPollTimeout() {
        assertFalse(heartbeat.pollTimeoutExpired(time.milliseconds()));
        time.sleep(maxPollIntervalMs / 2);

        assertFalse(heartbeat.pollTimeoutExpired(time.milliseconds()));
        time.sleep(maxPollIntervalMs / 2 + 1);

        assertTrue(heartbeat.pollTimeoutExpired(time.milliseconds()));
    }