@Provides @Singleton ImmutableHierarchicalConfiguration providesConfiguration( Set<ConfigurationSource> configurationSources) { CombinedConfiguration config = new CombinedConfiguration(); List<ConfigurationSource> sortedConfigurations = new ArrayList<ConfigurationSource>(); sortedConfigurations.addAll(configurationSources); Collections.sort(sortedConfigurations); ConfigurationSource previousConfigSource = null; for (ConfigurationSource configSource : sortedConfigurations) { if (previousConfigSource != null) { warnIfEqualPriority(previousConfigSource, configSource); } config.addConfiguration(configSource.getConfig()); previousConfigSource = configSource; } config.setNodeCombiner(new OverrideCombiner()); return config; }