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 assertSwapWithNullPlugins() {
        YamlAgentConfiguration yamlAgentConfig = new YamlAgentConfiguration();
        yamlAgentConfig.setPlugins(new YamlPluginCategoryConfiguration());
        assertTrue(YamlPluginsConfigurationSwapper.swap(yamlAgentConfig).isEmpty());
    }