@Test
public void testPrefixedGetProperties() throws Exception {

    EnvironmentPropertySource localEnvironmentPropertySource = new EnvironmentPropertySource("someprefix");
    Map<String, PropertyValue> props = localEnvironmentPropertySource.getProperties();
    for (Map.Entry<String, PropertyValue> en : props.entrySet()) {
        assertThat(en.getKey().startsWith("someprefix")).isTrue();
        String thisKey = en.getKey().replaceFirst("someprefix", "");
        if (!thisKey.startsWith("_")) {
            assertThat(en.getValue().getValue()).isEqualTo(System.getenv(thisKey));
        }
    }
}