def METHOD_NAME(add_gcs_login, run_line):
    cred_meta = load_response_set(globus_sdk.GCSClient.update_user_credential).metadata
    cred_id = cred_meta["id"]
    meta = load_response_set("cli.collection_operations").metadata
    ep_id = meta["endpoint_id"]
    add_gcs_login(ep_id)
    json_body = json.dumps({"foo": "bar"})
    line = (
        f"globus endpoint user-credential update from-json {ep_id} "
        f"{cred_id} '{json_body}'"
    )
    result = run_line(line)
    expected = f"Updated User Credential {cred_id}\n"
    assert result.output == expected
    # confirm that the arbitrary dict passed was used
    sent_body = json.loads(responses.calls[-1].request.body)
    assert sent_body == json.loads(json_body)