@Before
  public void setUp() throws Exception {

    client = new TestHiveMetaStoreClient(new HiveConf(Hive.class));
    hive = Hive.get(client);
    HiveConf conf = new HiveConfForTest(hive.getConf(), getClass());
    conf.set(MetastoreConf.ConfVars.FS_HANDLER_THREADS_COUNT.getVarname(), "15");
    conf.set(MetastoreConf.ConfVars.MSCK_PATH_VALIDATION.getVarname(), "throw");
    msc = new HiveMetaStoreClient(conf);

    conf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER,
        "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory");
    HiveConf.setBoolVar(conf, HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
    conf.set(ValidTxnList.VALID_TXNS_KEY, "1:");
    conf.set(ValidWriteIdList.VALID_WRITEIDS_KEY, TABLE_NAME + ":1:");
    conf.setVar(HiveConf.ConfVars.HIVE_TXN_MANAGER, "org.apache.hadoop.hive.ql.lockmgr.TestTxnManager");
    // Pick a small number for the batch size to easily test code with multiple batches.
    conf.setIntVar(HiveConf.ConfVars.METASTORE_BATCH_RETRIEVE_MAX, 2);
    SessionState.start(conf);
    SessionState.get().initTxnMgr(conf);
    Context ctx = new Context(conf);
    SessionState.get().getTxnMgr().openTxn(ctx, USER_NAME);

    t = new Table();
    org.apache.hadoop.hive.metastore.api.Table tTable = new org.apache.hadoop.hive.metastore.api.Table();
    tTable.setId(Long.MAX_VALUE);
    t.setTTable(tTable);
    Map<String, String> parameters = new HashMap<>();
    parameters.put(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL, "true");
    tTable.setParameters(parameters);
    tTable.setTableType(TableType.MANAGED_TABLE.toString());
    t.setTableName(TABLE_NAME);
    t.setDbName(DB_NAME);

    List<FieldSchema> partCols = new ArrayList<>();
    partCols.add(new FieldSchema());
    t.setPartCols(partCols);

  }
TestHiveMetaStoreClientApiArgumentsChecker

This class works with {@link TestHiveMetaStoreClient} in order to verify the arguments that
are sent from HS2 to HMS APIs.
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHiveMetaStoreClientApiArgumentsChecker.java