BindOperationExecutor implements
        CompensatingTransactionOperationExecutor { public void performOperation() { log.debug("Performing bind operation"); ldapOperations.bind(dn, originalObject, originalAttributes); } BindOperationExecutor(LdapOperations ldapOperations, Name dn,
            Object originalObject, Attributes originalAttributes); void rollback(); void commit(); void performOperation();  }
@Test public void testPerformOperation() { LdapName expectedDn = LdapUtils.newLdapName("cn=john doe"); Object expectedObject = new Object(); BasicAttributes expectedAttributes = new BasicAttributes(); BindOperationExecutor tested = new BindOperationExecutor( ldapOperationsMock, expectedDn, expectedObject, expectedAttributes); tested.performOperation(); verify(ldapOperationsMock).bind(expectedDn, expectedObject, expectedAttributes); }