def METHOD_NAME(httpserver: PluginHTTPServer, tmpdir: LocalPath):
    rest_api_url = httpserver.url_for("")
    temp_dir = tmpdir.mkdir("foo")
    test_job_zip = test_utils.find_test_resource("job-zip/test-job.zip")
    data = _read_file(test_job_zip)
    httpserver.expect_request(
        uri="/data-jobs/for-team/test-team/jobs/test-job/sources", method="GET"
    ).respond_with_data(data)
    key_data = b"key_data"
    httpserver.expect_request(
        uri="/data-jobs/for-team/test-team/jobs/test-job/keytab", method="GET"
    ).respond_with_data(key_data)
    runner = CliRunner()
    result = runner.invoke(
        download_job,
        ["-n", "test-job", "-t", "test-team", "-u", rest_api_url, "-p", temp_dir],
    )
    assert (
        result.exit_code == 0
    ), f"result exit code is not 0, result output: {result.output}"
    expected_dir_job = os.path.join(temp_dir, "test-job")
    assert pathlib.Path(expected_dir_job).is_dir()
    assert pathlib.Path(expected_dir_job).joinpath("config.ini").is_file()
    # Assert the key was downloaded to the parent directory
    expected_key_path = os.path.join(temp_dir, "test-job.keytab")
    assert pathlib.Path(expected_key_path).is_file()
    with open(expected_key_path, "rb") as key_file:
        actual_key_data = key_file.read()
        assert actual_key_data == key_data