EnvironmentPropertySource extends BasePropertySource { @Override public String getName() { if (isDisabled()) { return "environment-properties(disabled)"; } return "environment-properties"; } EnvironmentPropertySource();  EnvironmentPropertySource(int ordinal);  EnvironmentPropertySource(String prefix, int ordinal);  EnvironmentPropertySource(String prefix); @Override int getDefaultOrdinal(); @Override String getName(); @Override PropertyValue get(String key); @Override Map<String, PropertyValue> getProperties(); String getPrefix(); boolean isDisabled(); @Override ChangeSupport getChangeSupport(); static final int DEFAULT_ORDINAL; }
@Test public void testGetName() throws Exception { assertThat(envPropertySource.getName()).isEqualTo("environment-properties"); }