### Question:
ScheduledSingleThreadExecutor extends AbstractExecutorService implements ScheduledExecutorService { @Override public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) { if (command == null || unit == null) throw new NullPointerException(); if (period <= 0) throw new IllegalArgumentException(); ScheduledFutureTask<Void> sft = new ScheduledFutureTask<Void>(command, null, triggerTime(initialDelay, unit), unit.toNanos(period)); RunnableScheduledFuture<Void> t = decorateTask(command, sft); sft.outerTask = t; delayedExecute(t); return t; } ScheduledSingleThreadExecutor(ThreadFactory threadFactory);  ScheduledSingleThreadExecutor(); @Override ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit); @Override ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit); @Override ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit); @Override ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit); @Override void execute(Runnable command); @Override Future<?> submit(Runnable task); @Override Future<T> submit(Runnable task, T result); @Override Future<T> submit(Callable<T> task); void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value); boolean getContinueExistingPeriodicTasksAfterShutdownPolicy(); void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value); boolean getExecuteExistingDelayedTasksAfterShutdownPolicy(); void setRemoveOnCancelPolicy(boolean value); boolean getRemoveOnCancelPolicy(); @Override void shutdown(); @Override List<Runnable> shutdownNow(); @Override boolean awaitTermination(long timeout, TimeUnit unit); @Override boolean isShutdown(); @Override boolean isTerminated(); int getPoolSize(); int getActiveCount();  }### Answer:
@Test public void testFixedRate() throws Exception { final AtomicInteger counter = new AtomicInteger(); exec.scheduleAtFixedRate(new Runnable() { @Override public void run() { counter.incrementAndGet(); } }, 0, 30, TimeUnit.MILLISECONDS); Thread.sleep(2000); final int count = counter.get(); assertTrue("count: " + count, count > 30 && count < 75); }