@Test
public void testSchedulerRunFixedDelay() {

    Registry r = new DefaultRegistry();
    MeasurableScheduler scheduler = new MeasurableScheduler(r, "fixed_delay", 1);
    AL.set(0);
    scheduler.scheduleWithFixedDelay(new Runnable() {
        @Override
        public void run() {
            AL.incrementAndGet();
            Random r = new Random();
            int sleep = r.nextInt(150);
            try {
                Thread.sleep(sleep);
            } catch (InterruptedException e) {
                System.err.println("eeee");
            }
            System.out.println("--sleep:" + sleep + "--now:" + System.currentTimeMillis());
        }
    }, 0, 100, TimeUnit.MILLISECONDS);
    try {
        Thread.sleep(3000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    scheduler.shutdown();
    printMetrics(r);
    System.out.println("_____________" + AL.get());
    try {
        Thread.sleep(3000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}