public function testCanLoadMetadata()
{
$date = new DateTime();
$this->database->expects($this->once())->method('getMetadata')->with($this->user, $this->imageIdentifier)->will($this->returnValue(['key' => 'value']));
$this->database->expects($this->once())->method('getLastModified')->with([$this->user], $this->imageIdentifier)->will($this->returnValue($date));
$this->response->expects($this->once())->method('setModel')->with($this->isInstanceOf('Imbo\\Model\\Metadata'))->will($this->returnSelf());
$this->response->expects($this->once())->method('setLastModified')->with($date);
$this->listener->loadMetadata($this->event);
}