@Override
  public void createTable(Table tbl) throws InvalidObjectException, MetaException {
    if (callerVerifier != null) {
      CallerArguments args = new CallerArguments(tbl.getDbName());
      args.tblName = tbl.getTableName();
      Boolean success = callerVerifier.apply(args);
      if ((success != null) && !success) {
        throw new MetaException("InjectableBehaviourObjectStore: Invalid Create Table operation on DB: "
                + args.dbName + " table: " + args.tblName);
      }
    }
    super.createTable(tbl);
  }
A utility class to pass the arguments of the caller to the stub method.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/InjectableBehaviourObjectStore.java