@Bean
    public ShiroFilterFactoryBean shiroFilterFactoryBean(
            @Qualifier("shiroSecurityManager") final DefaultWebSecurityManager securityManager,
            @Qualifier("shiroProperties") final ShiroProperties shiroProperties) {
        ShiroFilterFactoryBean factoryBean = new ShiroFilterFactoryBean();
        factoryBean.setSecurityManager(securityManager);
        Map<String, Filter> filterMap = new LinkedHashMap<>();
        filterMap.put("statelessAuth", new StatelessAuthFilter());
        factoryBean.setFilters(filterMap);

        Map<String, String> filterChainDefinitionMap = new LinkedHashMap<>();

        for (String s : shiroProperties.getWhiteList()) {
            filterChainDefinitionMap.put(s, "anon");
        }

        filterChainDefinitionMap.put("/**", "statelessAuth");
        factoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
        return factoryBean;
    }
@Test
    public void testShiroFilterFactoryBean() {
        ShiroProperties shiroProperties = mock(ShiroProperties.class);
        List<String> whiteList = Arrays.asList("test1", "test2");
        when(shiroProperties.getWhiteList()).thenReturn(whiteList);
        ShiroFilterFactoryBean shiroFilterFactoryBean = shiroConfiguration.shiroFilterFactoryBean(securityManager, shiroProperties);
        assertEquals(securityManager, shiroFilterFactoryBean.getSecurityManager());
        assertNotNull(shiroFilterFactoryBean.getFilters());
        assertNotNull(shiroFilterFactoryBean.getFilters().get("statelessAuth"));
        Map<String, String> map = shiroFilterFactoryBean.getFilterChainDefinitionMap();
        assertNotNull(map);
        whiteList.stream().forEach(s -> assertEquals("anon", map.get(s)));
        assertEquals("statelessAuth", map.get("/**"));
    }