ThreadUtils { public static void sleep(long millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { throw new UncheckedInterruptedException(e); } }  static void sleep(long millis); @SuppressWarnings("deprecation") static void stopQuietly(Thread thread, String stopMessage);  }
@Test public void testSleep() { StopWatch watch = new StopWatch(); watch.start(); ThreadUtils.sleep(1000); watch.stop(); assertThat(watch.getTime()).isGreaterThanOrEqualTo(1000); assertThat(watch.getTime()).isLessThan(3000); }