public void testAuthenticatorCustomCreation() throws Exception { testProperties.setProperty(ComponentFactory.AUTHENTICATOR, SimpleAuthenticator.class.getName()); Authenticator authenticator = factory.getAuthenticator(new PromiscuousAuthenticator()); assertNotNull(authenticator); assertEquals(SimpleAuthenticator.class, authenticator.getClass()); }
@Test public void testAuthenticatorDefaultCreation() throws Exception { Authenticator authenticator = loader.getAuthenticator(new PromiscuousAuthenticator()); assertNotNull(authenticator); assertEquals(PromiscuousAuthenticator.class, authenticator.getClass()); }