SystemTimer { public void scheduleAtFixedRate(SystemTimerTask task, long delay, long period) { checkCancelled(); timer.scheduleAtFixedRate(task, delay, period); } SystemTimer(DistributedSystem distributedSystem); @Override String toString(); static int distributedSystemCount(); static void cancelTimers(DistributedSystem system); int timerPurge(); void schedule(SystemTimerTask task, long delay); void schedule(SystemTimerTask task, Date time); void scheduleAtFixedRate(SystemTimerTask task, long delay, long period); void schedule(SystemTimerTask task, long delay, long period); void cancel(); boolean isCancelled();  }
@Test public void scheduleAtFixedRate() { AtomicInteger invocations = new AtomicInteger(0); SystemTimer.SystemTimerTask task = new SystemTimer.SystemTimerTask() { @Override public void run2() { invocations.incrementAndGet(); } }; final long millis = System.currentTimeMillis(); final int delay = 1000; final int period = 500; systemTimer.scheduleAtFixedRate(task, delay, period); await().untilAsserted(() -> assertThat(invocations.get()).isGreaterThanOrEqualTo(2)); assertThat(System.currentTimeMillis()).isGreaterThanOrEqualTo(millis + delay + period); }