@Test
public void test_measure_timeout() {

    Clock clock = Clock.SYSTEM;
    DefaultRegistry r = new DefaultRegistry(clock);
    PollableInfoWrapper w = new PollableInfoWrapper(r.createId("info"),
        new AutoPollFriendlyInfo() {
            @Override
            public AutoPollSuggestion autoPollSuggest() {
                return AutoPollSuggestion.POLL_WHEN_UPDATED;
            }
            @Override
            public long lastModifiedTime() {
                return 10;
            }
            @Override
            public Object value() {
                try {
                    Thread.sleep(1100L);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                return "i_am_info";
            }
        }, clock);
    Indicator indicator = w.measure();
    assertThat(indicator).isNotNull();
    assertThat(indicator.measurements()).hasSize(1);
    assertThat(((Measurement<?>) indicator.measurements().iterator().next()).value())
        .isEqualTo("i_am_info");
}