def METHOD_NAME(agent_plugin_service, flask_client):
    resp = flask_client.put(
        get_url_for_resource(InstallAgentPlugin),
        data=AGENT_PLUGIN,
        follow_redirects=True,
    )
    assert resp.status_code == HTTPStatus.OK
    assert agent_plugin_service.install_plugin_from_repository.call_count == 0
    assert agent_plugin_service.install_plugin_archive.call_count == 1
    assert agent_plugin_service.install_plugin_archive.call_args[0][0] == AGENT_PLUGIN