EnvironmentVariablesPropertiesSource implements PropertiesSource { @Override public Map<String,String> getProperties() { Map<String,String> envVars = System.getenv(); if (!Collections.isEmpty(envVars)) { return new LinkedHashMap<>(envVars); } return java.util.Collections.emptyMap(); }  @Override Map<String,String> getProperties(); static PropertiesSource oktaFilteredPropertiesSource();  }
@Test public void testGetProperties() { setEnvironmentVariable("my_special_key", "my_special_value"); Map<String, String> props = new EnvironmentVariablesPropertiesSource().getProperties(); assertEquals(props.get("my_special_key"), "my_special_value"); }
@Test public void testGetPropertiesEmpty() { clearEnvironmentVariables(); Map<String, String> props = new EnvironmentVariablesPropertiesSource().getProperties(); assertEquals(props.size(), 0); }