In RetryTemplate, if we encounter an InterruptedException while sleeping for the configured back-off duration, we throw a RetryException with the InterruptedException as the cause.

However, in contrast to the specification for RetryException, we do not include the exceptions for previous retry attempts as suppressed exceptions in the RetryException which is thrown in such scenarios.

In order to comply with the documented contract for RetryException, we should include exceptions for previous attempts in the RetryException thrown for an InterruptedException as well.