@Test public void testRollback() { LdapName expectedOldName = LdapUtils.newLdapName("cn=oldDn"); LdapName expectedTempName = LdapUtils.newLdapName("cn=newDn"); UnbindOperationExecutor tested = new UnbindOperationExecutor( ldapOperationsMock, expectedOldName, expectedTempName); tested.rollback(); verify(ldapOperationsMock).rename(expectedTempName, expectedOldName); }
public void rollback() { try { ldapOperations.rename(temporaryDn, originalDn); } catch (Exception e) { log.warn("Filed to rollback unbind operation, temporaryDn: " + temporaryDn + "; originalDn: " + originalDn); } }
UnbindOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void rollback() { try { ldapOperations.rename(temporaryDn, originalDn); } catch (Exception e) { log.warn("Filed to rollback unbind operation, temporaryDn: " + temporaryDn + "; originalDn: " + originalDn); } } }
UnbindOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void rollback() { try { ldapOperations.rename(temporaryDn, originalDn); } catch (Exception e) { log.warn("Filed to rollback unbind operation, temporaryDn: " + temporaryDn + "; originalDn: " + originalDn); } } UnbindOperationExecutor(LdapOperations ldapOperations,
            Name originalDn, Name temporaryDn); }
UnbindOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void rollback() { try { ldapOperations.rename(temporaryDn, originalDn); } catch (Exception e) { log.warn("Filed to rollback unbind operation, temporaryDn: " + temporaryDn + "; originalDn: " + originalDn); } } UnbindOperationExecutor(LdapOperations ldapOperations,
            Name originalDn, Name temporaryDn); void rollback(); void commit(); void performOperation(); }
UnbindOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void rollback() { try { ldapOperations.rename(temporaryDn, originalDn); } catch (Exception e) { log.warn("Filed to rollback unbind operation, temporaryDn: " + temporaryDn + "; originalDn: " + originalDn); } } UnbindOperationExecutor(LdapOperations ldapOperations,
            Name originalDn, Name temporaryDn); void rollback(); void commit(); void performOperation();  }