code: @Override
    public Statement apply(final Statement base, FrameworkMethod method,
      Object target)
    {
      tearDownShiro(); // clean up whatever other tests might have left behind
  
      final SubjectAwareDescriptor desc = new SubjectAwareDescriptor();
      SubjectAware subjectAware = SubjectAwares.find(target);
  
      if (subjectAware != null)
      {
        desc.merge(subjectAware);
      }
  
      subjectAware = SubjectAwares.find(method.getAnnotations());
  
      if (subjectAware != null)
      {
        desc.merge(subjectAware);
      }
  
      return new Statement()
      {
  
        @Override
        public void evaluate() throws Throwable
        {
          if (desc.isMerged())
          {
            initializeSecurityManager(desc);
          }
  
          try
          {
            base.evaluate();
          }
          finally
          {
            tearDownShiro();
          }
        }
      };
    }
docs: {@inheritDoc}