static void checkEventSanity(Map<String, Set<String>> eventsMap, String replicaDbName) {
    replicaDbName = replicaDbName.toLowerCase();
    for (String event : eventsMap.keySet()) {
      Set<String> dbsForEvent = replicatedDbsForEvents.get(event);
      LOG.info("Examining dbs and tables for event " + event);
      // isreplicated should be true only for replicated database
      Assert.assertTrue(dbsForEvent.contains(replicaDbName));
      Assert.assertEquals(1, dbsForEvent.size());
      if (nonReplicatedDbsForEvents.get(event) != null) {
        Assert.assertFalse(nonReplicatedDbsForEvents.get(event).contains(replicaDbName));
      }

      Set<String> eventTables = replicatedTablesForEvents.get(event);
      Assert.assertEquals(eventsMap.get(event), eventTables);
    }
  }
ReplMetaStoreEventListenerTestImpl - Implementation of MetaStoreEventListener to test
isReplicated flag in some of the tests.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/ReplMetaStoreEventListenerTestImpl.java