YamlProxyConfigurationSwapper { public ProxyConfiguration swap(final YamlProxyConfiguration yamlConfig) { Map<String, Map<String, DataSourceParameter>> schemaDataSources = getDataSourceParametersMap(yamlConfig.getRuleConfigurations()); Map<String, Collection<RuleConfiguration>> schemaRules = getRuleConfigurations(yamlConfig.getRuleConfigurations()); Authentication authentication = new AuthenticationYamlSwapper().swapToObject(yamlConfig.getServerConfiguration().getAuthentication()); Properties props = yamlConfig.getServerConfiguration().getProps(); return new ProxyConfiguration(schemaDataSources, schemaRules, authentication, props); }  ProxyConfiguration swap(final YamlProxyConfiguration yamlConfig);  }
@Test public void assertSwap() { YamlProxyConfiguration yamlProxyConfig = getYamlProxyConfiguration(); ProxyConfiguration proxyConfig = new YamlProxyConfigurationSwapper().swap(yamlProxyConfig); assertAuthentication(proxyConfig); assertProxyConfigurationProps(proxyConfig); assertSchemaDataSources(proxyConfig); assertSchemaRules(proxyConfig); }