/**
  * {@inheritdoc}
  */
 public function modifyData(array $data)
 {
     $model = $this->locator->getProduct();
     $data[$model->getId()][self::DATA_SOURCE_DEFAULT]['samples_title'] = $this->samplesData->getSamplesTitle();
     $data[$model->getId()]['downloadable']['sample'] = $this->samplesData->getSamplesData();
     return $data;
 }
 /**
  * @return void
  */
 public function testModifyData()
 {
     $productId = 1;
     $samplesTitle = 'Samples Title';
     $samplesData = 'Samples Data';
     $resultData = [$productId => [Samples::DATA_SOURCE_DEFAULT => ['samples_title' => $samplesTitle], 'downloadable' => ['sample' => $samplesData]]];
     $this->locatorMock->expects($this->once())->method('getProduct')->willReturn($this->productMock);
     $this->productMock->expects($this->any())->method('getId')->willReturn($productId);
     $this->samplesDataMock->expects($this->once())->method('getSamplesTitle')->willReturn($samplesTitle);
     $this->samplesDataMock->expects($this->once())->method('getSamplesData')->willReturn($samplesData);
     $this->assertEquals($resultData, $this->samples->modifyData([]));
 }