@Test public void testRollback() { LdapName expectedNewName = LdapUtils.newLdapName("ou=newOu"); LdapName expectedOldName = LdapUtils.newLdapName("ou=someou"); RenameOperationExecutor tested = new RenameOperationExecutor( ldapOperationsMock, expectedOldName, expectedNewName); tested.rollback(); verify(ldapOperationsMock).rename(expectedNewName, expectedOldName); }
public void rollback() { log.debug("Rolling back rename operation"); try { ldapOperations.rename(newDn, originalDn); } catch (Exception e) { log.warn("Unable to rollback rename operation. " + "originalDn: " + newDn + "; newDn: " + originalDn); } }
RenameOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void rollback() { log.debug("Rolling back rename operation"); try { ldapOperations.rename(newDn, originalDn); } catch (Exception e) { log.warn("Unable to rollback rename operation. " + "originalDn: " + newDn + "; newDn: " + originalDn); } } }
RenameOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void rollback() { log.debug("Rolling back rename operation"); try { ldapOperations.rename(newDn, originalDn); } catch (Exception e) { log.warn("Unable to rollback rename operation. " + "originalDn: " + newDn + "; newDn: " + originalDn); } } RenameOperationExecutor(LdapOperations ldapOperations,
            Name originalDn, Name newDn); }
RenameOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void rollback() { log.debug("Rolling back rename operation"); try { ldapOperations.rename(newDn, originalDn); } catch (Exception e) { log.warn("Unable to rollback rename operation. " + "originalDn: " + newDn + "; newDn: " + originalDn); } } RenameOperationExecutor(LdapOperations ldapOperations,
            Name originalDn, Name newDn); void rollback(); void commit(); void performOperation(); }
RenameOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void rollback() { log.debug("Rolling back rename operation"); try { ldapOperations.rename(newDn, originalDn); } catch (Exception e) { log.warn("Unable to rollback rename operation. " + "originalDn: " + newDn + "; newDn: " + originalDn); } } RenameOperationExecutor(LdapOperations ldapOperations,
            Name originalDn, Name newDn); void rollback(); void commit(); void performOperation();  }