EnvironmentVariableConfigurationSource extends AbstractConfigurationSource { @Override public String getValue(String key) { return env.get(key.replace('.', '_').toUpperCase()); } EnvironmentVariableConfigurationSource();  EnvironmentVariableConfigurationSource(Map<String, String> env); @Override String getValue(String key); @Override String getName(); @Override void reload();  }
@Test public void testGetValue() throws Exception { final EnvironmentVariableConfigurationSource source = new EnvironmentVariableConfigurationSource(Collections.singletonMap("STAGEMONITOR_TESTBLA123", "bingo")); Assert.assertEquals("bingo", source.getValue("stagemonitor.testBla123")); }