private function getProvider($subjectOrOrderItem)
    {
        foreach ($this->registry->getProviders() as $provider) {
            if ($provider->supports($subjectOrOrderItem)) {
                return $provider;
            }
        }

        throw new InvalidArgumentException('Unsupported subject.');
    }