PropertySourceChangeSupport { public String getVersion() { return version.get() + ": timestamp="+timestamp; } 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 getVersion() { PropertySource ps = BuildablePropertySource.builder().withSimpleProperty("foo", "bar").withName("test").build(); PropertySourceChangeSupport support = new PropertySourceChangeSupport(ChangeSupport.SUPPORTED, ps); support.load(ps.getProperties()); String v0 = support.getVersion(); assertThat(v0).isNotNull(); String v1 = support.getVersion(); support.load(Collections.emptyMap()); String v2 = support.getVersion(); assertThat(v0).isEqualTo(v1); assertThat(v1).isNotEqualTo(v2); }