@Bean("shiroSecurityManager")
    public DefaultWebSecurityManager securityManager(@Lazy @Qualifier("shiroRealm") final AuthorizingRealm shiroRealm) {
        DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
        securityManager.setRealm(shiroRealm);
        return securityManager;
    }
@Test
    public void testSecurityManager() {
        AuthorizingRealm realm = mock(AuthorizingRealm.class);
        DefaultWebSecurityManager securityManager = shiroConfiguration.securityManager(realm);
        Object[] realms = securityManager.getRealms().toArray();
        assertEquals(1, realms.length);
        assert Objects.equals(realm, realms[0]);
    }