public function testGetFieldDataAvailable()
{
$storageMock = $this->getStorageMock();
$storageRegistryMock = $this->getStorageRegistryMock();
$storageMock->expects($this->once())->method('hasFieldData')->will($this->returnValue(true));
$storageMock->expects($this->once())->method('getFieldData')->with($this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\VersionInfo'), $this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Field'), $this->equalTo($this->getContextMock()));
$storageRegistryMock->expects($this->once())->method('getStorage')->with($this->equalTo('foobar'))->will($this->returnValue($storageMock));
$field = new Field();
$field->type = 'foobar';
$field->value = new FieldValue();
$handler = $this->getStorageHandler();
$handler->getFieldData($this->getVersionInfoMock(), $field);
}