public function testCanSendTheResponseAndInjectTheCorrectImageIdentifier()
{
$request = $this->getMock('Imbo\\Http\\Request\\Request');
$request->expects($this->once())->method('getImageIdentifier')->will($this->returnValue('checksum'));
$response = $this->getMock('Imbo\\Http\\Response\\Response');
$response->expects($this->once())->method('isNotModified')->with($request);
$response->expects($this->once())->method('send');
$response->headers = $this->getMock('Symfony\\Component\\HttpFoundation\\HeaderBag');
$response->headers->expects($this->once())->method('set')->with('X-Imbo-ImageIdentifier', 'checksum');
$event = $this->getMock('Imbo\\EventManager\\Event');
$event->expects($this->any())->method('getRequest')->will($this->returnValue($request));
$event->expects($this->any())->method('getResponse')->will($this->returnValue($response));
$this->listener->send($event);
}