@Test
    public void testGetProviderURLWithSpaces() throws Exception
    {
        // Setup fixture.
        final Map<String, String> properties = new HashMap<>();
        properties.put("ldap.host", "localhost");
        properties.put("ldap.port", "389");
        properties.put("ldap.sslEnabled", "false");
        final LdapManager manager = new LdapManager( properties );
        final LdapName name = new LdapName("ou=people,dc=example with spaces,dc=org");

        // Execute system under test.
        final String result = manager.getProviderURL( name );

        // Verify result.
        assertEquals("ldap://localhost:389/ou=people,dc=example%20with%20spaces,dc=org", result);
    }
Test if {@link LdapManager#getProviderURL(LdapName)} escapes whitespace characters in the baseDN value.
xmppserver/src/test/java/org/jivesoftware/openfire/ldap/LdapManagerTest.java