PropertySourceChangeSupport { public PropertyValue getValue(String key){ if(valueMap==null){ return null; } return valueMap.get(key); } PropertySourceChangeSupport(ChangeSupport changeSupport,
                                       PropertySource propertySource); ChangeSupport getChangeSupport(); String getVersion(); void addChangeListener(BiConsumer<Set<String>, PropertySource> l); void removeChangeListener(BiConsumer<Set<String>, PropertySource> l); void removeAllChangeListeners(); long load(Map<String, PropertyValue> properties); PropertyValue getValue(String key); Map<String, PropertyValue> getProperties(); void scheduleChangeMonitor(Supplier<Map<String, PropertyValue>> propertySupplier, long duration, TimeUnit timeUnit); void cancelSchedule();  }
@Test public void getValue() { PropertySource ps = BuildablePropertySource.builder().withSimpleProperty("foo", "bar").withName("test") .withSimpleProperty("foo", "bar").build(); PropertySourceChangeSupport support = new PropertySourceChangeSupport(ChangeSupport.IMMUTABLE, ps); support.load(ps.getProperties()); assertThat(support.getValue("foo")).isNotNull(); assertThat(support.getValue("bar")).isNull(); }