public function hasRoleReturnsTrueForAnonymousRoleIfNotAuthenticated()
{
$mockAuthenticationManager = $this->createMock(AuthenticationManagerInterface::class);
$mockAuthenticationManager->expects($this->any())->method('isAuthenticated')->will($this->returnValue(false));
$securityContext = $this->getAccessibleMock(Context::class, ['initialize']);
$securityContext->_set('authenticationManager', $mockAuthenticationManager);
$this->assertTrue($securityContext->hasRole('Neos.Flow:Anonymous'));
}