@Test
public void testRollback() {

    LdapName expectedOriginalDn = LdapUtils.newLdapName(
            "cn=john doe");
    LdapName expectedTempDn = LdapUtils.newLdapName(
            "cn=john doe_temp");
    Object expectedObject = new Object();
    BasicAttributes expectedAttributes = new BasicAttributes();
    RebindOperationExecutor tested = new RebindOperationExecutor(
            ldapOperationsMock, expectedOriginalDn, expectedTempDn,
            expectedObject, expectedAttributes);
    // perform test
    tested.rollback();
    verify(ldapOperationsMock).unbind(expectedOriginalDn);
    verify(ldapOperationsMock).rename(expectedTempDn, expectedOriginalDn);
}