private function validate(RedirectRouteInterface $entity)
    {
        if ('' === $entity->getTarget() && Response::HTTP_GONE !== (int)$entity->getStatusCode()) {
            throw new TargetIsEmptyException($entity);
        }

        if (in_array(strtolower($entity->getSource()), $this->sources)) {
            throw new DuplicatedSourceException($entity);
        }
    }