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 assertSwapWithSinglePluginConfiguration() {
        YamlPluginCategoryConfiguration yamlPluginCategoryConfig = new YamlPluginCategoryConfiguration();
        yamlPluginCategoryConfig.setLogging(Collections.singletonMap("log_fixture", createYamlPluginConfiguration("localhost", "random", 8080, new Properties())));
        YamlAgentConfiguration yamlAgentConfig = new YamlAgentConfiguration();
        yamlAgentConfig.setPlugins(yamlPluginCategoryConfig);
        Map<String, PluginConfiguration> actual = YamlPluginsConfigurationSwapper.swap(yamlAgentConfig);
        assertThat(actual.size(), is(1));
        PluginConfiguration actualLogFixtureConfig = actual.get("log_fixture");
        assertThat(actualLogFixtureConfig.getHost(), is("localhost"));
        assertThat(actualLogFixtureConfig.getPassword(), is("random"));
        assertThat(actualLogFixtureConfig.getPort(), is(8080));
        assertTrue(actualLogFixtureConfig.getProps().isEmpty());
    }