protected function createResponse($content = '', $statusCode = 200, $contentType = 'application/json')
    {
        if ('' === $content && 'application/json' === $contentType) {
            $content = '{}';
        }

        $response = new Response($content, $statusCode);
        $response->headers->set('Content-Type', $contentType);

        return $response;
    }