/**
  * Resets security test requirements
  *
  * @return void
  */
 protected function tearDownSecurity()
 {
     if ($this->accessDecisionManager !== NULL) {
         $this->accessDecisionManager->reset();
     }
     if ($this->policyService !== NULL) {
         $this->policyService->reset();
         // the following should be removed as soon as RoleRepository is cleaned up #43192
         $roleRepository = $this->objectManager->get('TYPO3\\Flow\\Security\\Policy\\RoleRepository');
         \TYPO3\Flow\Reflection\ObjectAccess::setProperty($roleRepository, 'newRoles', array(), TRUE);
     }
     if ($this->testingProvider !== NULL) {
         $this->testingProvider->reset();
     }
     if ($this->securityContext !== NULL) {
         $this->securityContext->clearContext();
     }
     \TYPO3\Flow\Reflection\ObjectAccess::setProperty($this->authenticationManager, 'isAuthenticated', NULL, TRUE);
 }