protected function create404($entityId, $loaderId)
    {
        return new NotFoundHttpException(sprintf('Entity with id "%s" not found%s.',
            $entityId,
            $this->container->getParameter('kernel.debug') ?
                sprintf(' : (looked into "%s")', $loaderId) :
                ''
        ));
    }