public function testGetFieldData()
{
$versionInfo = new VersionInfo();
$fieldValue = new FieldValue(array('data' => array('urlId' => 12)));
$field = new Field(array('id' => 42, 'value' => $fieldValue));
$gateway = $this->getGatewayMock();
$gateway->expects($this->once())->method('getIdUrlMap')->with(array(12))->will($this->returnValue(array(12 => 'http://ez.no')));
$storage = $this->getPartlyMockedStorage(array('getGateway'));
$storage->expects($this->once())->method('getGateway')->with($this->getContext())->will($this->returnValue($gateway));
$storage->getFieldData($versionInfo, $field, $this->getContext());
$this->assertEquals('http://ez.no', $field->value->externalData);
}