def METHOD_NAME(self):
    """Check that result is changed in check mode."""
    set_module_args({
        'name': 'api',
        'state': 'absent',
        '_ansible_check_mode': True,
    })
    with patch.object(basic.AnsibleModule, 'run_command') as run_command:
        run_command.return_value = 0, '', ''  # successful execution, no output
        with self.assertRaises(AnsibleExitJson) as result:
            icinga2_feature.main()
            self.assertTrue(result.exception.args[0]['changed'])
    self.assertEqual(run_command.call_count, 1)