onetimeAuthenticator = authenticator2;
DomainProvider provider = createDomainProviderMock(AuthenticationDomain.class, "authentication");
CompositeConnectorProvider compositeConnectorProvider = new CompositeConnectorProvider();
compositeConnectorProvider.setBundleContext(bundleContext);
ConnectorInstanceFactory factory = compositeConnectorProvider.createFactory(provider);
authManager = (AuthenticationDomain) factory.createNewInstance("authProvider");
DefaultAuthenticationProviderStrategy strategy = new DefaultAuthenticationProviderStrategy();
strategy.setUtilsService(new DefaultOsgiUtilsService(bundleContext));
Hashtable<String, Object> props = new Hashtable<String, Object>();
props.put("composite.strategy.name", "authManagerStrategy");
registerService(strategy, props, CompositeConnectorStrategy.class);
HashMap<String, String> attributes = new HashMap<String, String>();
attributes.put("compositeStrategy", "authManagerStrategy");
attributes.put("queryString", "(location.foo=authenticator/*)");
factory.applyAttributes((Connector) authManager, attributes);
}