@Test(expected = TaskExistsException.class)
public void schedule_twice() throws Exception {

    SimpleTaskScheduler scheduler = new SimpleTaskScheduler();
    String name = "hello";
    Runnable task = mock(Runnable.class);
    scheduler.schedule(name, task, 10);
    scheduler.schedule(name, task, 10);
}