@Test
public void testAutoPollSuggestionAfterInterval() {

    ManualClock clock = new ManualClock();
    clock.setWallTime(1);
    Registry r = new DefaultRegistry(clock);
    PollableInfoWrapper pollableInfoWrapper = new PollableInfoWrapper(r.createId("name"),
        new AutoPollFriendlyInfo() {
            @Override
            public AutoPollSuggestion autoPollSuggest() {
                return new AutoPollSuggestion(2, TimeUnit.SECONDS);
            }
            @Override
            public long lastModifiedTime() {
                return 1;
            }
            @Override
            public String value() {
                return "x";
            }
        }, clock);
    Assert.assertTrue(pollableInfoWrapper.isAutoPolledAllowed(1000));
    clock.setWallTime(3000);
    //让距离上次采集的间隔时间为:(3000-1)ms, 大于2000，所以继续 poll
    Assert.assertTrue(pollableInfoWrapper.isAutoPolledAllowed(2000));
}