@Test
public void isCancelled() {

    assertTrue(QueueDrainHelper.isCancelled(new BooleanSupplier() {
        @Override
        public boolean getAsBoolean() throws Exception {
            throw new IOException();
        }
    }));
}