RenameOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void performOperation() { log.debug("Performing rename operation"); ldapOperations.rename(originalDn, newDn); } RenameOperationExecutor(LdapOperations ldapOperations,
            Name originalDn, Name newDn); void rollback(); void commit(); void performOperation();  }
@Test public void testPerformOperation() { LdapName expectedNewName = LdapUtils.newLdapName("ou=newOu"); LdapName expectedOldName = LdapUtils.newLdapName("ou=someou"); RenameOperationExecutor tested = new RenameOperationExecutor( ldapOperationsMock, expectedOldName, expectedNewName); tested.performOperation(); verify(ldapOperationsMock).rename(expectedOldName, expectedNewName); }