public class MultipleAuthenticationManagersTest extends QpidBrokerTestCase
{
@Override
protected void setUp() throws Exception
{
TestBrokerConfiguration config = getBrokerConfiguration();
Map<String, Object> externalAuthProviderAttributes = new HashMap<String, Object>();
externalAuthProviderAttributes.put(AuthenticationManagerFactory.ATTRIBUTE_TYPE, AnonymousAuthenticationManagerFactory.PROVIDER_TYPE);
externalAuthProviderAttributes.put(AuthenticationProvider.NAME, TestBrokerConfiguration.ENTRY_NAME_ANONYMOUS_PROVIDER);
config.addAuthenticationProviderConfiguration(externalAuthProviderAttributes);
Map<String, Object> sslPortAttributes = new HashMap<String, Object>();
sslPortAttributes.put(Port.TRANSPORTS, Collections.singleton(Transport.SSL));
sslPortAttributes.put(Port.PORT, DEFAULT_SSL_PORT);
sslPortAttributes.put(Port.NAME, TestBrokerConfiguration.ENTRY_NAME_SSL_PORT);
sslPortAttributes.put(Port.KEY_STORE, TestBrokerConfiguration.ENTRY_NAME_SSL_KEYSTORE);
sslPortAttributes.put(Port.TRUST_STORES, Collections.singleton(TestBrokerConfiguration.ENTRY_NAME_SSL_TRUSTSTORE));
sslPortAttributes.put(Port.AUTHENTICATION_PROVIDER, TestBrokerConfiguration.ENTRY_NAME_ANONYMOUS_PROVIDER);
config.addPortConfiguration(sslPortAttributes);
// set the ssl system properties
setSystemProperty("javax.net.ssl.keyStore", KEYSTORE);
setSystemProperty("javax.net.ssl.keyStorePassword", KEYSTORE_PASSWORD);
setSystemProperty("javax.net.ssl.trustStore", TRUSTSTORE);