def METHOD_NAME(action_plugin, mocker, monkeypatch, task_args):
    """Check that the reboot command gets called and reboot verified."""
    def _patched_low_level_execute_command(cmd, *args, **kwargs):
        if cmd == _SENTINEL_REBOOT_COMMAND:
            raise AnsibleConnectionFailure('Fake connection drop')
        return {
            _SENTINEL_TEST_COMMAND: {
                'rc': 0,
                'stderr': '<test command stub-stderr>',
                'stdout': '<test command stub-stdout>',
            },
        }[cmd]
    monkeypatch.setattr(
        action_plugin,
        '_low_level_execute_command',
        _patched_low_level_execute_command,
    )
    action_plugin._connection = mocker.Mock()
    monkeypatch.setattr(action_plugin, 'check_boot_time', lambda *_a, **_kw: 5)
    monkeypatch.setattr(action_plugin, 'get_distribution', mocker.MagicMock())
    monkeypatch.setattr(action_plugin, 'get_system_boot_time', lambda d: 0)
    low_level_cmd_spy = mocker.spy(action_plugin, '_low_level_execute_command')
    action_result = action_plugin.run()
    assert low_level_cmd_spy.called
    low_level_cmd_spy.assert_any_call(
        task_args['reboot_command'], sudoable=True,
    )
    low_level_cmd_spy.assert_any_call(task_args['test_command'], sudoable=True)
    assert low_level_cmd_spy.call_count == 2
    assert low_level_cmd_spy.spy_return == {
        'rc': 0,
        'stderr': '<test command stub-stderr>',
        'stdout': '<test command stub-stdout>',
    }
    assert 'failed' not in action_result
    assert action_result == {'rebooted': True, 'changed': True, 'elapsed': 0}