/**
  * @depends testCodeAndMessages
  * @covers \ZfcUser\Authentication\Adapter\AdapterChainEvent::getIdentity
  * @covers \ZfcUser\Authentication\Adapter\AdapterChainEvent::setIdentity
  */
 public function testIdentity()
 {
     $testCode = 123;
     $testMessages = array('The message.');
     $testIdentity = 'the_user';
     $this->event->setCode($testCode);
     $this->event->setMessages($testMessages);
     $this->event->setIdentity($testIdentity);
     $this->assertEquals($testCode, $this->event->getCode(), "Asserting the code persisted.");
     $this->assertEquals($testMessages, $this->event->getMessages(), "Asserting the messages persisted.");
     $this->assertEquals($testIdentity, $this->event->getIdentity(), "Asserting the identity matches");
     $this->event->setIdentity();
     $this->assertNull($this->event->getCode(), "Asserting the code has been cleared.");
     $this->assertEquals(array(), $this->event->getMessages(), "Asserting the messages have been cleared.");
     $this->assertNull($this->event->getIdentity(), "Asserting the identity has been cleared");
 }