protected function decorateResponse($response, $method)
    {
        if (is_string($response)) {
            $response = $this->createResponse($response);
        }

        if (!($response instanceof Response)) {
            throw new \InvalidArgumentException(sprintf(
                '%s must returns a string or an object instance of %s, %s given.',
                get_class($this).'::'.$method,
                'Symfony\Component\HttpFoundation\Response',
                gettype($response)
            ));
        }

        return $response;
    }