GaussianIntervalPoller extends ScheduledTaskPoller { public void setMeanInterval(TimeInterval meanInterval) { this.meanInterval = meanInterval; } GaussianIntervalPoller();  GaussianIntervalPoller(TimeInterval meanInterval, TimeInterval standardDeviationInterval); @Override void init(); TimeInterval getMeanInterval(); void setMeanInterval(TimeInterval meanInterval); TimeInterval getStandardDeviationInterval(); void setStandardDeviationInterval(TimeInterval standardDeviationInterval);  }
@Test public void testSetMeanInterval() throws Exception { TimeInterval defaultMeanInterval = new TimeInterval(0L, TimeUnit.SECONDS); TimeInterval meanInterval = new TimeInterval(60L, TimeUnit.SECONDS); GaussianIntervalPoller p = new GaussianIntervalPoller(); assertNull(p.getMeanInterval()); assertEquals(defaultMeanInterval.toMilliseconds(), p.meanInterval()); p.setMeanInterval(meanInterval); assertEquals(meanInterval, p.getMeanInterval()); assertEquals(meanInterval.toMilliseconds(), p.meanInterval()); p.setMeanInterval(null); assertNull(p.getMeanInterval()); assertEquals(defaultMeanInterval.toMilliseconds(), p.meanInterval()); }