public static Map<String, PluginConfiguration> swap(final YamlAgentConfiguration yamlConfig) {
        YamlPluginCategoryConfiguration plugins = yamlConfig.getPlugins();
        if (null == plugins) {
            return Collections.emptyMap();
        }
        Map<String, PluginConfiguration> result = new LinkedHashMap<>();
        result.putAll(swap(plugins.getLogging()));
        result.putAll(swap(plugins.getMetrics()));
        result.putAll(swap(plugins.getTracing()));
        return result;
    }
@Test
    void assertSwapWithMultiplePluginConfigurations() {
        YamlPluginCategoryConfiguration yamlPluginCategoryConfig = new YamlPluginCategoryConfiguration();
        yamlPluginCategoryConfig.setLogging(Collections.singletonMap("log_fixture", createYamlPluginConfiguration(null, null, 8080, createProperties())));
        yamlPluginCategoryConfig.setMetrics(Collections.singletonMap("metrics_fixture", createYamlPluginConfiguration("localhost", "random", 8081, createProperties())));
        yamlPluginCategoryConfig.setTracing(Collections.singletonMap("tracing_fixture", createYamlPluginConfiguration("localhost", "random", 8082, createProperties())));
        YamlAgentConfiguration yamlAgentConfig = new YamlAgentConfiguration();
        yamlAgentConfig.setPlugins(yamlPluginCategoryConfig);
        Map<String, PluginConfiguration> actual = YamlPluginsConfigurationSwapper.swap(yamlAgentConfig);
        assertThat(actual.size(), is(3));
        assertLogFixturePluginConfiguration(actual.get("log_fixture"));
        assertMetricsPluginConfiguration(actual.get("metrics_fixture"));
        assertTracingPluginConfiguration(actual.get("tracing_fixture"));
    }