code: private void tearDownShiro()
    {
      try
      {
        SecurityManager securityManager = SecurityUtils.getSecurityManager();
  
        LifecycleUtils.destroy(securityManager);
        ThreadContext.unbindSecurityManager();
        ThreadContext.unbindSubject();
        ThreadContext.remove();
      }
      catch (UnavailableSecurityManagerException e)
      {
  
        // we don't care about this when cleaning up the test environment
        // (for example, maybe the subclass is a unit test and it didn't
        // need a SecurityManager instance because it was using only mock Subject instances)
      }
  
      SecurityUtils.setSecurityManager(null);
    }
docs: Method description