/**
  * Test invalid argument.
  */
 public function testInvalidArgument()
 {
     $diffItem = new CreateDiffItem();
     $diffItem->setCategory('some-category');
     $diffItem->setTimestamp(new \DateTime());
     $this->storage->expects($this->never())->method('save');
     $this->setExpectedException('InvalidArgumentException', 'No valid item ID provided.');
     $this->service->extract($diffItem);
 }
 /**
  * Save results to storage.
  *
  * @param AbstractDiffItem $item
  * @param string           $action
  */
 private function saveResult(AbstractDiffItem $item, $action)
 {
     $this->storage->save($action, $item->getCategory(), $item->getItemId(), $item->getTimestamp(), $this->getShopIds());
 }