@Test public void testRollback() { DefaultCompensatingTransactionOperationManager tested = new DefaultCompensatingTransactionOperationManager( operationFactoryMock); tested.getOperationExecutors().push(operationExecutorMock); tested.rollback(); verify(operationExecutorMock).rollback(); }
public void rollback() { log.debug("Performing rollback"); while (!operationExecutors.isEmpty()) { CompensatingTransactionOperationExecutor rollbackOperation = operationExecutors.pop(); try { rollbackOperation.rollback(); } catch (Exception e) { throw new TransactionSystemException( "Error occurred during rollback", e); } } }
DefaultCompensatingTransactionOperationManager implements
        CompensatingTransactionOperationManager { public void rollback() { log.debug("Performing rollback"); while (!operationExecutors.isEmpty()) { CompensatingTransactionOperationExecutor rollbackOperation = operationExecutors.pop(); try { rollbackOperation.rollback(); } catch (Exception e) { throw new TransactionSystemException( "Error occurred during rollback", e); } } } }
DefaultCompensatingTransactionOperationManager implements
        CompensatingTransactionOperationManager { public void rollback() { log.debug("Performing rollback"); while (!operationExecutors.isEmpty()) { CompensatingTransactionOperationExecutor rollbackOperation = operationExecutors.pop(); try { rollbackOperation.rollback(); } catch (Exception e) { throw new TransactionSystemException( "Error occurred during rollback", e); } } } DefaultCompensatingTransactionOperationManager(
            CompensatingTransactionOperationFactory operationFactory); }
DefaultCompensatingTransactionOperationManager implements
        CompensatingTransactionOperationManager { public void rollback() { log.debug("Performing rollback"); while (!operationExecutors.isEmpty()) { CompensatingTransactionOperationExecutor rollbackOperation = operationExecutors.pop(); try { rollbackOperation.rollback(); } catch (Exception e) { throw new TransactionSystemException( "Error occurred during rollback", e); } } } DefaultCompensatingTransactionOperationManager(
            CompensatingTransactionOperationFactory operationFactory); void performOperation(Object resource, String operation,
            Object[] args); void rollback(); void commit(); }
DefaultCompensatingTransactionOperationManager implements
        CompensatingTransactionOperationManager { public void rollback() { log.debug("Performing rollback"); while (!operationExecutors.isEmpty()) { CompensatingTransactionOperationExecutor rollbackOperation = operationExecutors.pop(); try { rollbackOperation.rollback(); } catch (Exception e) { throw new TransactionSystemException( "Error occurred during rollback", e); } } } DefaultCompensatingTransactionOperationManager(
            CompensatingTransactionOperationFactory operationFactory); void performOperation(Object resource, String operation,
            Object[] args); void rollback(); void commit();  }