ApolloDynamicConfiguration implements DynamicConfiguration { @Override public String getInternalProperty(String key) { return dubboConfig.getProperty(key, null); } ApolloDynamicConfiguration(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 String getProperties(String key, String group, long timeout); @Override String getInternalProperty(String key);  }
@Test public void testGetInternalProperty() throws InterruptedException { String mockKey = "mockKey2"; String mockValue = String.valueOf(new Random().nextInt()); putMockRuleData(mockKey, mockValue, DEFAULT_NAMESPACE); TimeUnit.MILLISECONDS.sleep(1000); apolloDynamicConfiguration = new ApolloDynamicConfiguration(url); assertEquals(mockValue, apolloDynamicConfiguration.getInternalProperty(mockKey)); mockValue = "mockValue2"; System.setProperty(mockKey, mockValue); assertEquals(mockValue, apolloDynamicConfiguration.getInternalProperty(mockKey)); mockKey = "notExistKey"; assertNull(apolloDynamicConfiguration.getInternalProperty(mockKey)); }