### Question:
RetryUtils { public static boolean isInterrupted(Throwable error) { if (error instanceof AbortedException) { return true; } if (error.getCause() != null) { Throwable cause = error.getCause(); if (cause instanceof InterruptedException || cause instanceof InterruptedIOException && !(cause instanceof SocketTimeoutException)) { return true; } } return false; }  static boolean isThrottlingException(AmazonServiceException ase); static boolean isRequestEntityTooLargeException(AmazonServiceException ase); static boolean isClockSkewError(AmazonServiceException ase); static boolean isInterrupted(Throwable error);  }### Answer:
@Test public void testIsInterruptedException() { assertTrue(RetryUtils.isInterrupted(new AbortedException())); Exception interrupted = new Exception(new InterruptedException()); assertTrue(RetryUtils.isInterrupted(interrupted)); Exception interruptedio = new Exception(new InterruptedIOException()); assertTrue(RetryUtils.isInterrupted(interruptedio)); Exception socketTimeout = new Exception(new SocketTimeoutException()); assertFalse(RetryUtils.isInterrupted(socketTimeout)); }