/**
  * @Then /^there should be no units of (this product) on hold$/
  */
 public function thereShouldBeNoUnitsOfThisProductOnHold(ProductInterface $product)
 {
     Assert::eq(0, $this->indexPage->getOnHoldQuantityFor($product->getFirstVariant()), sprintf('Unexpected on hand quantity for "%s" variant. It should be "%s" but is "%s"', $product->getFirstVariant()->getName(), 0, $this->indexPage->getOnHandQuantityFor($product->getFirstVariant())));
 }
 /**
  * @Then the :variant variant of :product product should have :amount items on hold
  */
 public function theVariantOfProductShouldHaveItemsOnHold(ProductVariantInterface $variant, ProductInterface $product, $amount)
 {
     $this->indexPage->open(['productId' => $product->getId()]);
     Assert::same($amount, $this->indexPage->getOnHoldQuantityFor($variant), sprintf('Unexpected on hold quantity for "%s" variant. It should be "%s" but is "%s"', $variant->getName(), $amount, $this->indexPage->getOnHandQuantityFor($variant)));
 }
 /**
  * @param int $expectedAmount
  * @param ProductVariantInterface $variant
  *
  * @throws \InvalidArgumentException
  */
 private function assertOnHoldQuantityOfVariant($expectedAmount, $variant)
 {
     $actualAmount = $this->indexPage->getOnHoldQuantityFor($variant);
     Assert::same((int) $expectedAmount, $actualAmount, sprintf('Unexpected on hold quantity for "%s" variant. It should be "%s" but is "%s"', $variant->getName(), $expectedAmount, $actualAmount));
 }