public function testFactory()
{
$redirectStrategyOptions = $this->getMock('ZfcRbac\\Options\\RedirectStrategyOptions');
$moduleOptionsMock = $this->getMock('ZfcRbac\\Options\\ModuleOptions');
$moduleOptionsMock->expects($this->once())->method('getRedirectStrategy')->will($this->returnValue($redirectStrategyOptions));
$authenticationServiceMock = $this->getMock('Zend\\Authentication\\AuthenticationService');
$serviceLocatorMock = $this->getMock('Zend\\ServiceManager\\ServiceLocatorInterface');
$serviceLocatorMock->expects($this->at(0))->method('get')->with('ZfcRbac\\Options\\ModuleOptions')->will($this->returnValue($moduleOptionsMock));
$serviceLocatorMock->expects($this->at(1))->method('get')->with('Zend\\Authentication\\AuthenticationService')->will($this->returnValue($authenticationServiceMock));
$factory = new RedirectStrategyFactory();
$redirectStrategy = $factory->createService($serviceLocatorMock);
$this->assertInstanceOf('ZfcRbac\\View\\Strategy\\RedirectStrategy', $redirectStrategy);
}