ConfigurationRegistry implements Closeable { public static Builder builder() { return new Builder(); } @Deprecated  ConfigurationRegistry(Iterable<? extends ConfigurationOptionProvider> optionProviders,
								 List<ConfigurationSource> configSources); @Deprecated  ConfigurationRegistry(Iterable<? extends ConfigurationOptionProvider> optionProviders,
								 List<ConfigurationSource> configSources, boolean failOnMissingRequiredValues); static Builder builder(); T getConfig(Class<T> configClass); Collection<ConfigurationOptionProvider> getConfigurationOptionProviders(); Map<String, List<ConfigurationOption<?>>> getConfigurationOptionsByCategory(); Map<String, ConfigurationOption<?>> getConfigurationOptionsByKey(); Map<String, Boolean> getNamesOfConfigurationSources(); ConfigurationOption<?> getConfigurationOptionByKey(String key); void scheduleReloadAtRate(final long rate, TimeUnit timeUnit); void reload(String key); void reloadAllConfigurationOptions(); void reloadDynamicConfigurationOptions(); void addConfigurationSource(ConfigurationSource configurationSource); void addConfigurationSourceAfter(ConfigurationSource configurationSource, Class<? extends ConfigurationSource> addAfter); void addConfigurationSource(ConfigurationSource configurationSource, boolean firstPrio); void save(String key, String value, String configurationSourceName); String getString(String key); @Override void close();  }
@Test(expected = IllegalArgumentException.class) public void testDuplicateLabel() throws Exception { final ConfigurationOptionProvider optionProvider = TestConfigurationOptionProvider.of( ConfigurationOption.stringOption().key("foo").description("Foo").build(), ConfigurationOption.stringOption().key("foo").label("Bar").build()); ConfigurationRegistry.builder().addOptionProvider(optionProvider).build(); }
@Test(expected = IllegalStateException.class) public void testFailOnRequiredValueMissing() throws Exception { final ConfigurationOption<String> configurationOption = ConfigurationOption.stringOption().key("foo").buildRequired(); final ConfigurationOptionProvider optionProvider = TestConfigurationOptionProvider.of(configurationOption); ConfigurationRegistry.builder().addOptionProvider(optionProvider).failOnMissingRequiredValues(true).build(); }