SystemPropertySource extends BasePropertySource { @Override public PropertyValue get(String key) { if(isDisabled()){ return null; } reload(); return this.cachedProperties.getValue(key); } SystemPropertySource();  SystemPropertySource(int ordinal); @Override PropertyValue get(String key); void reload(); @Override Map<String, PropertyValue> getProperties(); String getVersion(); @Override ChangeSupport getChangeSupport(); static final int DEFAULT_ORDINAL; }
@Test public void testGet() throws Exception { String propertyKeyToCheck = System.getProperties().stringPropertyNames().iterator().next(); PropertyValue property = testPropertySource.get(propertyKeyToCheck); assertThat(property).isNotNull(); assertThat(property.getValue()).isEqualTo(System.getProperty(propertyKeyToCheck)); }