InternalConfig { static InternalConfig load() throws JsonParseException, JsonMappingException, IOException { URL configUrl = getResource(DEFAULT_CONFIG_RESOURCE_RELATIVE_PATH, true, false); if (configUrl == null) { configUrl = getResource(DEFAULT_CONFIG_RESOURCE_ABSOLUTE_PATH, false, false); } InternalConfigJsonHelper config = loadfrom(configUrl, InternalConfigJsonHelper.class); InternalConfigJsonHelper configOverride; URL overrideUrl = getResource(CONFIG_OVERRIDE_RESOURCE, false, true); if (overrideUrl == null) { overrideUrl = getResource(CONFIG_OVERRIDE_RESOURCE, false, false); } if (overrideUrl == null) { log.debug("Configuration override " + CONFIG_OVERRIDE_RESOURCE + " not found."); configOverride = new InternalConfigJsonHelper(); } else { configOverride = loadfrom(overrideUrl, InternalConfigJsonHelper.class); } EndpointDiscoveryConfig endpointDiscoveryConfig = new EndpointDiscoveryConfig(); URL endpointDiscoveryConfigUrl = getResource(ENDPOINT_DISCOVERY_CONFIG_ABSOLUTE_PATH, false, false); if (endpointDiscoveryConfigUrl != null) { endpointDiscoveryConfig = loadfrom(endpointDiscoveryConfigUrl, EndpointDiscoveryConfig.class); } InternalConfig merged = new InternalConfig(config, configOverride, endpointDiscoveryConfig); merged.setDefaultConfigFileLocation(configUrl); merged.setOverrideConfigFileLocation(overrideUrl); return merged; } InternalConfig(InternalConfigJsonHelper defaults,
                   InternalConfigJsonHelper override,
                   EndpointDiscoveryConfig endpointDiscoveryConfig); SignerConfig getSignerConfig(String serviceName); HttpClientConfig getHttpClientConfig(String httpClientName); SignerConfig getSignerConfig(String serviceName, String regionName); List<HostRegexToRegionMapping> getHostRegexToRegionMappings(); String getUserAgentTemplate(); boolean endpointDiscoveryEnabled(); URL getDefaultConfigFileLocation(); URL getOverrideConfigFileLocation();  }
@Test public void load() throws Exception { InternalConfig config = InternalConfig.load(); assertNotNull(config); config.dump(); }