private void addEvent(CacheEvent<K, V> e, boolean setInvoked) {
    synchronized (lock) {
      if (setInvoked) {
        invoked = true;
      }
      if (eventHistory != null) {
        eventHistory.add(e);
      }
    }
  }
Should be called for every event delivered to this listener
geode-dunit/src/main/java/org/apache/geode/cache30/TestCacheListener.java