Ldap test refactoring