FixedIntervalPoller extends ScheduledTaskPoller { public void setPollInterval(TimeInterval pollInterval) { this.pollInterval = pollInterval; } FixedIntervalPoller();  FixedIntervalPoller(TimeInterval interval); TimeInterval getPollInterval(); void setPollInterval(TimeInterval pollInterval);  }
@Test public void testSetPollInterval() throws Exception { TimeInterval defaultInterval = new TimeInterval(20L, TimeUnit.SECONDS); TimeInterval interval = new TimeInterval(60L, TimeUnit.SECONDS); FixedIntervalPoller p = new FixedIntervalPoller(); assertNull(p.getPollInterval()); assertEquals(defaultInterval.toMilliseconds(), p.pollInterval()); p.setPollInterval(interval); assertEquals(interval, p.getPollInterval()); assertEquals(interval.toMilliseconds(), p.pollInterval()); p.setPollInterval(null); assertNull(p.getPollInterval()); assertEquals(defaultInterval.toMilliseconds(), p.pollInterval()); }