@Before
  public void setUp() throws Exception {
    conf = MetastoreConf.newMetastoreConf();
    // Directly set client capability since HiveConf is unaccessable through standalone-metastore
    MetastoreConf.setBoolVar(conf, ConfVars.HIVE_IN_TEST, true);
    MetaStoreTestUtils.setConfForStandloneMode(conf);

    // Get new client
    client = metaStore.getClient();
    String[] clientCaps = new String[]{"HIVEMANAGEDINSERTWRITE","HIVEMANAGESTATS","HIVECACHEINVALIDATE",
        "CONNECTORWRITE"};
    client.setProcessorCapabilities(clientCaps);

    // Clean up
    client.dropDatabase(DB_NAME + "_one", true, true, true);
    client.dropDatabase(DB_NAME + "_two", true, true, true);

    metaStore.cleanWarehouseDirs();

    //Create test dbs and tables
    expectedMetas = new ArrayList<>();
    String dbName = DB_NAME + "_one";
    createDB(dbName);
    expectedMetas.add(createTestTable(dbName, TABLE_NAME + "_one", TableType.EXTERNAL_TABLE));
    expectedMetas.add(createTestTable(dbName, TABLE_NAME + "", TableType.MANAGED_TABLE, "cmT"));
    expectedMetas.add(createTestTable(dbName, "v" + TABLE_NAME, TableType.VIRTUAL_VIEW));

    dbName = DB_NAME + "_two";
    createDB(dbName);
    expectedMetas.add(createTestTable(dbName, TABLE_NAME + "_one", TableType.MANAGED_TABLE));
    expectedMetas.add(createTestTable(dbName, "v" + TABLE_NAME, TableType.MATERIALIZED_VIEW, ""));
  }
API tests for HMS client's getTableMeta method.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestGetTableMeta.java