Map<String, Set<String>> prepareInc2Data(String dbName) throws Throwable {
    primary.run("use " + dbName)
            .run("insert into t4 values (333)")
            .run("create table t7 (str string)")
            .run("insert into t7 values ('aaa')")
            .run("drop table t1");
    // Add expected events with associated tables, if any.
    Map<String, Set<String>> eventsMap = new HashMap<>();
    eventsMap.put(CreateTableEvent.class.getName(), new HashSet<>(Arrays.asList("t7")));
    eventsMap.put(AlterTableEvent.class.getName(), new HashSet<>(Arrays.asList("t4", "t7")));
    eventsMap.put(DropTableEvent.class.getName(), new HashSet<>(Arrays.asList("t1")));

    return eventsMap;
  }
TestMetaStoreEventListenerInRepl - Test metastore events created by replication.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestMetaStoreEventListenerInRepl.java