public static boolean containsInterruptedException(Throwable t) {
    return !Iterables
        .isEmpty(Iterables.filter(Throwables.getCausalChain(t), x -> isInterrupted(x)));
  }
@Test
  public void containsInterruptedException() {
    Throwable t1 = new IOException(new RuntimeException(new InterruptedException()));
    Throwable t2 = new IOException(new InterruptedIOException());
    Throwable t3 = new InterruptedException();
    Throwable t4 = new IOException(new RuntimeException(new IOException()));
    assertTrue(ExceptionUtils.containsInterruptedException(t1));
    assertTrue(ExceptionUtils.containsInterruptedException(t2));
    assertTrue(ExceptionUtils.containsInterruptedException(t3));
    assertFalse(ExceptionUtils.containsInterruptedException(t4));
  }