@Test public void testKafkaZookeeperTimeout() { Map<String, Object> conf = new HashMap<>(); conf.put("valid", "validValue"); conf.put("zookeeper.connection.whatever", "invalid"); conf.put("security.invalid1", "invalid"); conf.put("zookeeper.connection.timeout.ms", "42"); conf.put("zookeeper.connection.timeout", "42"); KafkaConfiguration kc = new KafkaConfiguration(conf.entrySet()); assertThat(kc.asOrderedProperties().asMap().get("valid"), is("validValue")); assertThat(kc.asOrderedProperties().asMap().get("zookeeper.connection.whatever"), is(nullValue())); assertThat(kc.asOrderedProperties().asMap().get("security.invalid1"), is(nullValue())); assertThat(kc.asOrderedProperties().asMap().get("zookeeper.connection.timeout.ms"), is("42")); assertThat(kc.asOrderedProperties().asMap().get("zookeeper.connection.timeout"), is(nullValue())); }
public OrderedProperties asOrderedProperties() { return options; }
AbstractConfiguration { public OrderedProperties asOrderedProperties() { return options; } }
AbstractConfiguration { public OrderedProperties asOrderedProperties() { return options; } AbstractConfiguration(String configuration, List<String> forbiddenPrefixes);  AbstractConfiguration(String configuration, List<String> forbiddenPrefixes, Map<String, String> defaults);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes, List<String> forbiddenPrefixExceptions);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes, Map<String, String> defaults);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes, List<String> forbiddenPrefixExceptions, Map<String, String> defaults); }
AbstractConfiguration { public OrderedProperties asOrderedProperties() { return options; } AbstractConfiguration(String configuration, List<String> forbiddenPrefixes);  AbstractConfiguration(String configuration, List<String> forbiddenPrefixes, Map<String, String> defaults);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes, List<String> forbiddenPrefixExceptions);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes, Map<String, String> defaults);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes, List<String> forbiddenPrefixExceptions, Map<String, String> defaults); String getConfigOption(String configOption); String getConfigOption(String configOption, String defaultValue); void setConfigOption(String configOption, String value); void removeConfigOption(String configOption); String getConfiguration(); OrderedProperties asOrderedProperties(); }
AbstractConfiguration { public OrderedProperties asOrderedProperties() { return options; } AbstractConfiguration(String configuration, List<String> forbiddenPrefixes);  AbstractConfiguration(String configuration, List<String> forbiddenPrefixes, Map<String, String> defaults);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes, List<String> forbiddenPrefixExceptions);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes, Map<String, String> defaults);  AbstractConfiguration(Iterable<Map.Entry<String, Object>> jsonOptions, List<String> forbiddenPrefixes, List<String> forbiddenPrefixExceptions, Map<String, String> defaults); String getConfigOption(String configOption); String getConfigOption(String configOption, String defaultValue); void setConfigOption(String configOption, String value); void removeConfigOption(String configOption); String getConfiguration(); OrderedProperties asOrderedProperties();  }