/**
  * @param string $productSku
  * @param int $productId
  * @dataProvider saveStockItemBySkuWithExceptionDataProvider
  * @expectedException \Magento\Framework\Exception\NoSuchEntityException
  */
 public function testSaveStockItemBySkuWithException($productSku, $productId)
 {
     // 1. Get mocks
     /** @var \Magento\Catalog\Model\Product|\PHPUnit_Framework_MockObject_MockObject $product */
     $product = $this->getMockBuilder('Magento\\Catalog\\Model\\Product')->disableOriginalConstructor()->getMock();
     /** @var Data\StockItemDetails|\PHPUnit_Framework_MockObject_MockObject $stockItemDetailsDo */
     $stockItemDetailsDo = $this->getMockBuilder('Magento\\CatalogInventory\\Service\\V1\\Data\\StockItemDetails')->disableOriginalConstructor()->getMock();
     // 2. Set fixtures
     $this->productLoader->expects($this->any())->method('load')->will($this->returnValueMap([[$productSku, $product]]));
     $product->expects($this->any())->method('getId')->will($this->returnValue($productId));
     // 3. Run tested method
     $this->model->saveStockItemBySku($productSku, $stockItemDetailsDo);
 }