@AfterEach
    public void tearDownSubject() {
        //3. Unbind the subject from the current thread:
        clearSubject();
    }
Simple example test class showing how one may perform unit tests for code that requires Shiro APIs.

@since 1.2
core/src/test/java/org/apache/shiro/test/ExampleShiroUnitTest.java