    @Test
    public void testTimeWait() throws InterruptedException {

        TimeWaitRunner timeWaitLogger = new TimeWaitRunner(1000);
        AtomicLong atomicLong = new AtomicLong();
        new Thread(()->{
            while (true){
                timeWaitLogger.doWithRunnable(atomicLong::incrementAndGet);
            }
        }).start();
        Thread.sleep(1500);
        Assert.assertEquals(2L,atomicLong.get());
    }