public function map($resourceClass, $policy)
    {
        if (!class_exists($resourceClass)) {
            $message = sprintf('Resource class `%s` does not exist.', $resourceClass);
            throw new InvalidArgumentException($message);
        }

        if (!is_string($policy) && !is_object($policy) && !is_callable($policy)) {
            $message = sprintf(
                'Policy must be a valid class name, an object or a callable, `%s` given.',
                gettype($policy)
            );
            throw new InvalidArgumentException($message);
        }
        if (is_string($policy) && !class_exists($policy)) {
            $message = sprintf('Policy class `%s` does not exist.', $policy);
            throw new InvalidArgumentException($message);
        }

        $this->map[$resourceClass] = $policy;

        return $this;
    }