### Question:
ListenerManager implements ICleanable { public <T> void register(ObservableValue<T> observable, ChangeListener<? super T> listener) { if (!simpleChangeListeners.containsKey(observable)) { this.simpleChangeListeners.put(observable, Collections.newSetFromMap(new WeakHashMap<>())); } Set<ChangeListener> observers = this.simpleChangeListeners.get(observable); observers.add(listener); observable.addListener(listener); }  void register(ObservableValue<T> observable, ChangeListener<? super T> listener); void register(ObservableList<T> observable, ListChangeListener<? super T> listener); void register(Observable observable, InvalidationListener listener); @Override void clean();  }### Answer:
@Test public void testGC() { StringProperty property = new SimpleStringProperty(); Object testObject = new Object(); ChangeListener<String> listener = (observable, oldValue, newValue) -> System.out.println(">" + newValue + "" + testObject); GCVerifier propertyVerifier = GCVerifier.create(property); GCVerifier listenerVerifier = GCVerifier.create(listener); manager.register(property, listener); property = new SimpleStringProperty(); listener = null; propertyVerifier.verify(); listenerVerifier.verify(); }