Scheduler implements Closeable { public void scheduleAtFixedRate( @NotNull String name, long period, @NotNull TimeUnit unit, @NotNull Runnable task) { executor.scheduleAtFixedRate(new SafeRunnable(name, task), period, period, unit); } Scheduler(@Nullable String name); void execute(@NotNull String name, @NotNull Runnable task); void scheduleOnce(
            @NotNull String name,
            long delay,
            @NotNull TimeUnit unit,
            @NotNull Runnable task); void scheduleAtFixedRate(
            @NotNull String name,
            long period,
            @NotNull TimeUnit unit,
            @NotNull Runnable task); void scheduleWithFixedDelay(
            @NotNull String name,
            long delay,
            @NotNull TimeUnit unit,
            @NotNull Runnable task); @Override void close();  }
@Test public void scheduleAtFixedRate() throws Exception { TestTask task = new TestTask(5); scheduler.scheduleAtFixedRate("scheduleAtFixedRate", 200, MILLISECONDS, task); assertNull(task.getThreadName()); assertTrue(task.await()); assertEquals("scheduleAtFixedRate", task.getThreadName()); }