    @Test
    public void isLDAPEnabled()
    {

        // No param set
        assertEquals(false, this.config.isLDAPEnabled());
        assertEquals(false, this.config.isLDAPEnabled(null));

        // Param set in xwiki.cfg only
        setCfgPreference("xwiki.authentication.ldap", "1");
        assertEquals(true, this.config.isLDAPEnabled());
        assertEquals(true, this.config.isLDAPEnabled(null));

        // Param override in XWikiPreferences
        setWikiPreference("ldap", "0");
        assertEquals(false, this.config.isLDAPEnabled());
        assertEquals(false, this.config.isLDAPEnabled(null));
    }