EtcdDynamicConfiguration implements DynamicConfiguration { @Override public String getConfig(String key, String group, long timeout) throws IllegalStateException { return (String) getInternalProperty(convertKey(group, key)); } EtcdDynamicConfiguration(URL url); @Override void addListener(String key, String group, ConfigurationListener listener); @Override void removeListener(String key, String group, ConfigurationListener listener); @Override String getConfig(String key, String group, long timeout); @Override Object getInternalProperty(String key);  }
@Test public void testGetConfig() { put("/dubbo/config/org.apache.dubbo.etcd.testService/configurators", "hello"); put("/dubbo/config/test/dubbo.properties", "aaa=bbb"); Assert.assertEquals("hello", config.getConfig("org.apache.dubbo.etcd.testService.configurators", DynamicConfiguration.DEFAULT_GROUP)); Assert.assertEquals("aaa=bbb", config.getConfig("dubbo.properties", "test")); }