def METHOD_NAME(gen_sensor_args):
    with gen_sensor_args as (cli_args, instance):
        runner = CliRunner()
        with mock.patch("dagster._core.instance.DagsterInstance.get") as _instance:
            _instance.return_value = instance
            result = runner.invoke(
                sensor_preview_command,
                cli_args + ["foo_sensor"],
            )
            assert result.exit_code == 0
            assert result.output == "Sensor returning run requests for 1 run(s):\n\nfoo: FOO\n\n"