public function testWithoutContext()
 {
     $authenticationResult = new Result(Result::SUCCESS, 'username');
     $authenticationServiceMock = $this->getMock('UghAuthentication\\Authentication\\AuthenticationServiceInterface');
     $authenticationServiceMock->expects($this->once())->method('authenticate')->will($this->returnValue($authenticationResult));
     $authenticationValidator = new Authentication();
     $authenticationValidator->setService($authenticationServiceMock);
     $authenticationValidator->setIdentity('username');
     $authenticationValidator->setCredential('credential');
     $this->assertEquals('username', $authenticationValidator->getIdentity());
     $this->assertEquals('credential', $authenticationValidator->getCredential());
     $this->assertTrue($authenticationValidator->isValid());
 }