private void generateSometableEvents(String dbName, String tableName) throws Exception {
    // CREATE_DATABASE event is generated but we filter this out while fetching events.
    driver.run("create database if not exists "+dbName);
    driver.run("use "+dbName);
    // Event 1: CREATE_TABLE event
    driver.run("create table " + tableName + " (c int) partitioned by (ds string)");
    // Event 2: ADD_PARTITION, 3: ALTER_PARTITION, 4: UPDATE_PART_COL_STAT_EVENT events
    driver.run("insert into table " + tableName + " partition (ds = 'today') values (1)");
    // Event 5: INSERT, 6: ALTER_PARTITION, 7: UPDATE_PART_COL_STAT_EVENT events
    driver.run("insert into table " + tableName + " partition (ds = 'today') values (2)");
    // Event 8: INSERT, 9: ALTER_PARTITION, 10: UPDATE_PART_COL_STAT_EVENT events
    driver.run("insert into table " + tableName + " partition (ds) values (3, 'today')");
    // Event 11: ADD_PARTITION, Event 12: ALTER_PARTITION events
    driver.run("alter table " + tableName + " add partition (ds = 'yesterday')");
  }
The method creates some events in notification log and fetches the events
based on the fields set on the NotificationEventRequest object. It includes
setting database name, table name(s), event skip list (i.e., filter out events
that are not required). These fields are optional.
@throws Exception
itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/TestDbNotificationListener.java