@Test(timeout = 2000)
public void testRetrySchedulerNotInvokedOnExceptionCausedByDeadlockAndActiveUnitOfWork() throws Throwable {
final AtomicReference<Object> result = new AtomicReference<Object>();
final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
doAnswer(new Failure(new RuntimeException(new DeadlockException("Mock"))))
.when(mockCommandBus).dispatch(isA(CommandMessage.class), isA(CommandCallback.class));
UnitOfWork uow = DefaultUnitOfWork.startAndGet();
try {
result.set(gateway.waitForReturnValue("Command"));
} catch (Exception e) {