/**
  * {@inheritdoc}
  */
 public function generateForOrderCheckoutState(OrderInterface $order, $parameters = [], $referenceType = self::ABSOLUTE_PATH)
 {
     if (!isset($this->routeCollection[$order->getCheckoutState()]['route'])) {
         throw new RouteNotFoundException();
     }
     return $this->router->generate($this->routeCollection[$order->getCheckoutState()]['route'], $parameters, $referenceType);
 }
 function it_throws_route_not_found_exception_if_there_is_no_route_for_given_state(RouterInterface $router, OrderInterface $order)
 {
     $order->getCheckoutState()->willReturn('shipping_selected');
     $router->generate(Argument::any())->shouldNotBeCalled();
     $this->shouldThrow(RouteNotFoundException::class)->during('generateForOrderCheckoutState', [$order]);
 }