implement LDAP/SQL unit test
improvement on ldap tests