boolean shouldHeartbeat(long now) {
        update(now);
        return heartbeatTimer.isExpired();
    }
@Test
    public void testShouldHeartbeat() {
        heartbeat.sentHeartbeat(time.milliseconds());
        time.sleep((long) ((float) heartbeatIntervalMs * 1.1));
        assertTrue(heartbeat.shouldHeartbeat(time.milliseconds()));
    }