@Test
public void testRecordOperation() {

    RenameOperationRecorder tested = new RenameOperationRecorder(
            ldapOperationsMock);
    // Perform test
    CompensatingTransactionOperationExecutor operation = tested
            .recordOperation(new Object[] { "ou=someou", "ou=newou" });
    assertThat(operation instanceof RenameOperationExecutor).isTrue();
    RenameOperationExecutor rollbackOperation = (RenameOperationExecutor) operation;
    assertThat(rollbackOperation.getLdapOperations()).isSameAs(ldapOperationsMock);
    assertThat(rollbackOperation.getNewDn().toString()).isEqualTo("ou=newou");
    assertThat(rollbackOperation.getOriginalDn().toString()).isEqualTo("ou=someou");
}