@Test
public void testExecutePeriodically() throws Exception {

    final CountDownLatch latch = new CountDownLatch(1);
    scheduler.executePeriodically(new CountDownRunnable(latch), 10);
    assertTrue(latch.await(5000, TimeUnit.MILLISECONDS));
}