### Question:
AsyncUtil { public static boolean sleep(long theMillis) { try { Thread.sleep(theMillis); return true; } catch (InterruptedException theE) { Thread.currentThread().interrupt(); ourLog.warn("Sleep for {}ms was interrupted", theMillis); return false; } } private  AsyncUtil(); static boolean sleep(long theMillis); static boolean awaitLatchAndThrowInternalErrorExceptionOnInterrupt(CountDownLatch theInitialCollectionLatch, long theTime, TimeUnit theTimeUnit); static boolean awaitLatchAndIgnoreInterrupt(CountDownLatch theInitialCollectionLatch, long theTime, TimeUnit theTimeUnit);  }### Answer:
@Test public void testSleep() { AsyncUtil.sleep(10); }
@Test public void testSleepWithInterrupt() { AtomicBoolean outcomeHolder = new AtomicBoolean(true); Thread thread = new Thread(() -> { boolean outcome = AsyncUtil.sleep(10000); outcomeHolder.set(outcome); }); thread.start(); thread.interrupt(); await().until(()-> outcomeHolder.get() == false); }