public function testLoadDraftsForUser()
{
$handler = $this->getContentHandler();
$rows = array(array('ezcontentobject_version_contentobject_id' => 42, 'ezcontentobject_version_version' => 2));
$gatewayMock = $this->getGatewayMock();
$mapperMock = $this->getMapperMock();
$gatewayMock->expects($this->once())->method('listVersionsForUser')->with($this->equalTo(23))->will($this->returnValue($rows));
$gatewayMock->expects($this->once())->method('loadVersionedNameData')->with($this->equalTo(array(array('id' => 42, 'version' => 2))))->will($this->returnValue(array()));
$mapperMock->expects($this->once())->method('extractVersionInfoListFromRows')->with($this->equalTo($rows), $this->equalTo(array()))->will($this->returnValue(array(new VersionInfo())));
$res = $handler->loadDraftsForUser(23);
$this->assertEquals(array(new VersionInfo()), $res);
}