assertEquals(401, response.getStatus());
}
@Test
public void testInitBasicSecurityFilterProvider() throws ServletException {
SimpleFilterConfig filterConfig = new SimpleFilterConfig();
filterConfig.setParameter("principalFormat", "sid");
filterConfig.setParameter("roleFormat", "none");
filterConfig.setParameter("allowGuestLogin", "true");
filterConfig.setParameter("securityFilterProviders", "waffle.servlet.spi.BasicSecurityFilterProvider\n");
filterConfig.setParameter("waffle.servlet.spi.BasicSecurityFilterProvider/realm", "DemoRealm");
filterConfig.setParameter("authProvider", MockWindowsAuthProvider.class.getName());
this.filter.init(filterConfig);
assertEquals(this.filter.getPrincipalFormat(), PrincipalFormat.SID);
assertEquals(this.filter.getRoleFormat(), PrincipalFormat.NONE);
assertTrue(this.filter.isAllowGuestLogin());
assertEquals(1, this.filter.getProviders().size());