@Test
public void testSleep() {

    assertTrue(Duration.seconds(0.5).lessThan(Duration.benchmark(new Runnable() {
        @Override
        public void run() {
            Duration.seconds(1.5).sleep();
        }
    })));
    assertTrue(Duration.seconds(1).greaterThan(Duration.benchmark(new Runnable() {
        @Override
        public void run() {
            Duration.hours(-1).sleep();
        }
    })));
}