protected function configure(Response $response, $contentType=null)
    {
        if (!$contentType) {
            return $response;
        }

        if (strtolower($contentType) == strtolower($this->serializer->mimeType())) {
            $response->setSerializer($this->serializer);
        }

        return $response;
    }