@BeforeEach
    void bind() {
        ThreadContext.bind(testApplication.getSecurityManager());
    }
Tests @Injecting Subject, Session, Principal and SecurityManager with CDI
integration-tests/jakarta-ee/src/test/java/org/apache/shiro/testing/cdi/ComponentInjectionIT.java