@Test
  public void testAlterTableExpectedPropertyMatch() throws Exception {
    Assume.assumeTrue(MetastoreConf.getBoolVar(metaStore.getConf(), ConfVars.TRY_DIRECT_SQL));
    Assume.assumeTrue(MetastoreConf.getBoolVar(metaStore.getConf(), ConfVars.TRY_DIRECT_SQL_DDL));
    Table originalTable = testTables[0];

    EnvironmentContext context = new EnvironmentContext();
    context.putToProperties(hive_metastoreConstants.EXPECTED_PARAMETER_KEY, "transient_lastDdlTime");
    context.putToProperties(hive_metastoreConstants.EXPECTED_PARAMETER_VALUE,
            originalTable.getParameters().get("transient_lastDdlTime"));

    client.alter_table(originalTable.getCatName(), originalTable.getDbName(), originalTable.getTableName(),
            originalTable, context);
  }
This test creates and queries a table and then drops it. Good for testing the happy path
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java