Map<String, Set<String>> prepareIncData(String dbName) throws Throwable {
    primary.run("use " + dbName)
            .run("create table t6 stored as orc tblproperties (\"transactional\"=\"true\")" +
                    " as select * from t1")
            .run("alter table t2 add columns (placetype string)")
            .run("update t2 set placetype = 'city'")
            .run("insert into t1 values (3)")
            .run("drop table t2")
            .run("alter database " + dbName + " set dbproperties('some.useless.property'='1')");

    // Add expected events with associated tables, if any.
    Map<String, Set<String>> eventsMap = new HashMap<>();
    eventsMap.put(CreateTableEvent.class.getName(), new HashSet<>(Arrays.asList("t6")));
    eventsMap.put(AlterTableEvent.class.getName(), new HashSet<>(Arrays.asList("t1", "t2", "t6")));
    eventsMap.put(DropTableEvent.class.getName(), new HashSet<>(Arrays.asList("t2")));

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