### Question:
B2Sleeper { @SuppressWarnings("UnusedReturnValue") boolean sleepSeconds(int seconds) { return sleepMilliseconds(seconds * 1000); }    }### Answer:
@Test public void testSleeping() { final B2Clock clock = new B2ClockImpl(); final long beforeMillis = clock.monotonicMillis(); sleeper.sleepSeconds(1); final long afterMillis = clock.monotonicMillis(); assertTrue((afterMillis - beforeMillis) > 900); }
@Test public void testInterruptedSleep() { Thread.currentThread().interrupt(); sleeper.sleepSeconds(1); assertTrue(Thread.interrupted()); }