@BeforeEach
    public void setup() {
        ThreadContext.remove();
        realm = new TestActiveDirectoryRealm();
        securityManager = new DefaultSecurityManager(realm);
        SecurityUtils.setSecurityManager(securityManager);
    }
Simple test case for ActiveDirectoryRealm.
<p/>
todo:  While the original incarnation of this test case does not actually test the
heart of ActiveDirectoryRealm (no meaningful implementation of queryForLdapAccount, etc.) it obviously should.
This version was intended to mimic my current usage scenario in an effort to debug upgrade issues which were not related
to LDAP connectivity.
core/src/test/java/org/apache/shiro/realm/activedirectory/ActiveDirectoryRealmTest.java