GovernanceBootstrapInitializer extends AbstractBootstrapInitializer { @Override protected ProxyConfiguration getProxyConfiguration(final YamlProxyConfiguration yamlConfig) { governanceFacade.init(new GovernanceConfigurationYamlSwapper().swapToObject(yamlConfig.getServerConfiguration().getGovernance()), yamlConfig.getRuleConfigurations().keySet()); initConfigurations(yamlConfig); return loadProxyConfiguration(); }    }
@Test public void assertGetProxyConfiguration() throws IOException { initConfigCenter(); YamlProxyConfiguration yamlProxyConfig = ProxyConfigurationLoader.load("/conf/reg_center/"); assertProxyConfiguration(getInitializer().getProxyConfiguration(yamlProxyConfig)); closeConfigCenter(); }
@Test public void assertGetProxyConfigurationFromLocalConfiguration() throws IOException { YamlProxyConfiguration yamlProxyConfig = ProxyConfigurationLoader.load("/conf/local"); ProxyConfiguration actual = getInitializer().getProxyConfiguration(yamlProxyConfig); assertNotNull(actual); assertProxyConfiguration(actual); closeConfigCenter(); }