def METHOD_NAME(
    mock_island_api_client: IIslandAPIClient,
    mock_plugin_factories: Dict[AgentPluginType, IPluginFactory],
    plugin_registry: PluginRegistry,
    plugin_type,
):
    agent_plugin = agent_plugin_of_type(plugin_type)
    mock_island_api_client.get_agent_plugin = MagicMock(return_value=agent_plugin)
    plugin_registry.get_plugin(plugin_type, PLUGIN_NAME)
    assert mock_plugin_factories[plugin_type].create.called