@Test
public void testSetSaslMechanismHandlers()
{
LdapServer server = new LdapServer();
Map<String, MechanismHandler> handlers = new HashMap<String, MechanismHandler>();
MechanismHandler handler = new PlainMechanismHandler();
handlers.put( SupportedSaslMechanisms.PLAIN, handler );
server.setSaslMechanismHandlers( handlers );
assertEquals( handler, server.getMechanismHandler( SupportedSaslMechanisms.PLAIN ) );
assertTrue( server.getSupportedMechanisms().contains( SupportedSaslMechanisms.PLAIN ) );
server.removeSaslMechanismHandler( SupportedSaslMechanisms.PLAIN );