@Override
  public void onEvent(PreEventContext context) throws MetaException, NoSuchObjectException,
      InvalidOperationException {
    notifyList.add(context);
  }
DummyPreListener.

An implementation of MetaStorePreEventListener which stores the Events it's seen in a list.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyPreListener.java