@AfterEach
    public void tearDown() {
        sm.destroy();
        ThreadContext.remove();
    }
Unit test for the {@link DefaultSessionManager DefaultSessionManager} implementation.
core/src/test/java/org/apache/shiro/session/mgt/DefaultSessionManagerTest.java