EnvironmentConfiguration implements Configuration { @Override public Object getInternalProperty(String key) { String value = System.getenv(key); if (StringUtils.isEmpty(value)) { value = System.getenv(StringUtils.toOSStyleKey(key)); } return value; }  @Override Object getInternalProperty(String key);  }
@Test public void testGetInternalProperty() { Map<String, String> map = new HashMap<>(); map.put(MOCK_KEY, MOCK_VALUE); try { setEnv(map); EnvironmentConfiguration configuration = new EnvironmentConfiguration(); Assertions.assertEquals(MOCK_VALUE, configuration.getInternalProperty("dubbo.key")); Assertions.assertEquals(MOCK_VALUE, configuration.getInternalProperty("key")); Assertions.assertEquals(MOCK_VALUE, configuration.getInternalProperty("dubbo_key")); Assertions.assertEquals(MOCK_VALUE, configuration.getInternalProperty(MOCK_KEY)); } catch (Exception e) { e.printStackTrace(); } }