public function mapToObjectReturnsObjectFromIdentityMapIfAvailable()
{
$objectData = ['identifier' => '1234'];
$object = new \stdClass();
$mockSession = $this->createMock(Persistence\Generic\Session::class);
$mockSession->expects($this->once())->method('hasIdentifier')->with('1234')->will($this->returnValue(true));
$mockSession->expects($this->once())->method('getObjectByIdentifier')->with('1234')->will($this->returnValue($object));
$dataMapper = $this->getAccessibleMock(Persistence\Generic\DataMapper::class, ['dummy']);
$dataMapper->injectPersistenceSession($mockSession);
$dataMapper->_call('mapToObject', $objectData);
}