public function testGetStoreId()
 {
     $storeId = 10;
     $storeObject = new \Magento\Framework\DataObject(['id' => $storeId]);
     $shipmentMock = $this->getMock('Magento\\Sales\\Model\\Order\\Shipment', ['getStore', '__wakeup'], [], '', false);
     $shipmentMock->expects($this->once())->method('getStore')->will($this->returnValue($storeObject));
     $this->_model->setShipment($shipmentMock);
     $this->assertEquals($storeId, $this->_model->getStoreId());
 }
 /**
  * @param \Magento\Sales\Model\Order\Shipment\Track $track
  * @return $this
  */
 public function addTrack(\Magento\Sales\Model\Order\Shipment\Track $track)
 {
     $track->setShipment($this)->setParentId($this->getId())->setOrderId($this->getOrderId())->setStoreId($this->getStoreId());
     if (!$track->getId()) {
         $this->getTracksCollection()->addItem($track);
     }
     /**
      * Track saving is implemented in _afterSave()
      * This enforces \Magento\Framework\Model\AbstractModel::save() not to skip _afterSave()
      */
     $this->_hasDataChanges = true;
     return $this;
 }