code: public void checkAllListenersFired() {
      for (Map.Entry<Object, Object> entry : mappings.entrySet()) {
        if (entry.getValue() instanceof Listener) {
          throw new IllegalStateException(
              "Listener for " + entry.getKey() + " never fired: " + entry.getValue());
        }
      }
    }
docs: Asserts that there are no pending listeners.
  
  <p>This can be useful in a test environment to ensure that the copy worked correctly. N.B. it
  is possible for a copy to be 'correct' and for not all listeners to fire, this is common when
  copying small parts of the AST (anything below a template).