@Test
public void testBackOffInterrupted() throws Throwable {
RetryTemplate retryTemplate = new RetryTemplate();
retryTemplate.setBackOffPolicy(new StatelessBackOffPolicy() {
protected void doBackOff() throws BackOffInterruptedException {
throw new BackOffInterruptedException("foo");
}
});
try {
retryTemplate.execute(new RetryCallback<Object, Exception>() {
public Object doWithRetry(RetryContext context) throws Exception {