@Test
public void testWithCustomKeyGenerator() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
StatefulRetryOperationsInterceptor interceptor = RetryInterceptorBuilder.stateful()
.messageKeyGenerator(new MessageKeyGenerator() {
@Override
public Object getKey(Message message) {
latch.countDown();
return "foo";