SystemPropertiesConfigurationSource implements ConfigurationSource { @Override public Properties getConfiguration(Environment environment) { return (Properties) System.getProperties().clone(); }  @Override Properties getConfiguration(Environment environment); @Override void init(); @Override String toString();  }
@Test void returnsOSName() { assertThat(source.getConfiguration(new DefaultEnvironment())).containsKey("os.name"); }
@Test void returnsOsNameForAnyEnvironment() { assertThat(source.getConfiguration(mock(Environment.class))).containsKey("os.name"); }
@Test void doesNotReturnUndefinedKeys() { assertThat(source.getConfiguration(new DefaultEnvironment())).doesNotContainKey("missing.property"); }
@Test void returnsManuallyDefinedKeys() { System.setProperty("manually.added.property", "defined"); assertThat(source.getConfiguration(new DefaultEnvironment())).containsKey("manually.added.property"); }
@Test void returnsManuallyDefinedKeysAfterReload() { assertThat(source.getConfiguration(new DefaultEnvironment())).doesNotContainKey("reloaded.property"); System.setProperty("reloaded.property", "defined"); assertThat(source.getConfiguration(new DefaultEnvironment())).containsKey("reloaded.property"); }