def METHOD_NAME(self, _mock_cluster_state):
    cli_runner = cli_testing.CliRunner()
    result = cli_runner.invoke(cli.cancel,
                               [spot.SPOT_CONTROLLER_NAME, '-a'])
    assert result.exit_code == 1
    assert 'Cancelling the spot controller\'s jobs is not allowed.' in str(
        result.output)