private function getOperation(string $method, string $className): stdClass
    {
        foreach ($this->getOperations($className) as $operation) {
            if ($operation->{'hydra:method'} === $method) {
                return $operation;
            }
        }

        throw new \InvalidArgumentException(sprintf('Operation "%s" of class "%s" doesn\'t exist.', $method, $className));
    }