/**
  * Resets security test requirements
  *
  * @return void
  */
 protected function tearDownSecurity()
 {
     if ($this->privilegeManager !== null) {
         $this->privilegeManager->reset();
     }
     if ($this->policyService !== null) {
         $this->policyService->reset();
     }
     if ($this->testingProvider !== null) {
         $this->testingProvider->reset();
     }
     if ($this->securityContext !== null) {
         $this->securityContext->clearContext();
     }
     if ($this->authenticationManager !== null) {
         \Neos\Utility\ObjectAccess::setProperty($this->authenticationManager, 'isAuthenticated', null, true);
     }
 }