@Test public void removeChangeListener() { PropertySource ps = BuildablePropertySource.builder().withName("test").build(); PropertySourceChangeSupport support = new PropertySourceChangeSupport(ChangeSupport.SUPPORTED, ps); BiConsumer<Set<String>, PropertySource> l = mock(BiConsumer.class); support.addChangeListener(l); support.removeChangeListener(l); support.load(Collections.emptyMap()); verifyNoMoreInteractions(l); }
public void removeChangeListener(BiConsumer<Set<String>, PropertySource> l){ if(changeSupport==ChangeSupport.SUPPORTED) { listeners.remove(l); } }
PropertySourceChangeSupport { public void removeChangeListener(BiConsumer<Set<String>, PropertySource> l){ if(changeSupport==ChangeSupport.SUPPORTED) { listeners.remove(l); } } }
PropertySourceChangeSupport { public void removeChangeListener(BiConsumer<Set<String>, PropertySource> l){ if(changeSupport==ChangeSupport.SUPPORTED) { listeners.remove(l); } } PropertySourceChangeSupport(ChangeSupport changeSupport,
                                       PropertySource propertySource); }
PropertySourceChangeSupport { public void removeChangeListener(BiConsumer<Set<String>, PropertySource> l){ if(changeSupport==ChangeSupport.SUPPORTED) { listeners.remove(l); } } 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(); }
PropertySourceChangeSupport { public void removeChangeListener(BiConsumer<Set<String>, PropertySource> l){ if(changeSupport==ChangeSupport.SUPPORTED) { listeners.remove(l); } } 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();  }