public function getPreconditionByClassName($className)
    {
        if (!class_exists($className, true)) {
            throw new Exception(sprintf('The precondition class %s does not exist', $className));
        }
        $result = $this->app->make($className);
        if (!$result instanceof PreconditionInterface) {
            throw new Exception(sprintf('The class %1$s should implement the interface %2$s', $className, PreconditionInterface::class));
        }

        return $result;
    }