def METHOD_NAME(
    mock_hadoop_server, exploit: Callable[[], Tuple[bool, bool]], monkeypatch
):
    monkeypatch.setattr(
        "agent_plugins.exploiters.hadoop.src.hadoop_exploit_client.insecure_generate_random_string",
        MagicMock(return_value="random"),
    )
    exploit()
    payload = mock_hadoop_server.last_request.json()
    assert mock_hadoop_server.call_count == 2
    assert mock_hadoop_server.request_history[1].url == SUBMIT_APP_URL
    assert payload["application-id"] == APPLICATION_ID
    assert payload["application-name"] == f"{HadoopOptions().yarn_application_suffix}random"
    assert payload["am-container-spec"]["commands"]["command"] == COMMAND
    assert payload["application-type"] == "YARN"