public function testDeleteById()
 {
     $sku = 'product-42';
     $this->productFactoryMock->expects($this->once())->method('create')->will($this->returnValue($this->productMock));
     $this->resourceModelMock->expects($this->once())->method('getIdBySku')->with($sku)->will($this->returnValue('42'));
     $this->productMock->expects($this->once())->method('load')->with('42');
     $this->assertTrue($this->model->deleteById($sku));
 }
 /**
  * {@inheritdoc}
  */
 public function deleteById($sku)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'deleteById');
     if (!$pluginInfo) {
         return parent::deleteById($sku);
     } else {
         return $this->___callPlugins('deleteById', func_get_args(), $pluginInfo);
     }
 }