add test for ldap using mock