@Test
    void testDefaultFiltersPresent() {
        Ini ini = new Ini();
        //just a normal configuration line in the MAIN section for any of the default filters should work
        //out of the box.  So, create the main section and just config one of them:
        @SuppressWarnings("deprecation")
        Ini.Section section = ini.addSection(IniSecurityManagerFactory.MAIN_SECTION_NAME);
        section.put("authc.loginUrl", "/login.jsp");

        @SuppressWarnings("deprecation")
        WebIniSecurityManagerFactory factory = new WebIniSecurityManagerFactory(ini);
        org.apache.shiro.mgt.SecurityManager sm = factory.getInstance();
        assertNotNull(sm);
        assertTrue(sm instanceof DefaultWebSecurityManager);

        //now assert that all of the default filters exist:
        Map<String, ?> beans = factory.getBeans();
        for (DefaultFilter defaultFilter : DefaultFilter.values()) {
            Filter filter = (Filter) beans.get(defaultFilter.name());
            assertNotNull(filter);
            assertTrue(defaultFilter.getFilterClass().isAssignableFrom(filter.getClass()));
        }
    }
Test that ensures the WebIniSecurityManagerFactory will automatically add the default
filters to the pool of beans before the INI configuration is interpreted.
web/src/test/java/org/apache/shiro/web/config/WebIniSecurityManagerFactoryTest.java