@Test(expected = InvalidOperationException.class)
  public void testAlterTableNoSuchTableInThisDatabase() throws Exception {
    Table originalTable = testTables[2];
    Table newTable = originalTable.deepCopy();

    client.alter_table(OTHER_DATABASE, originalTable.getTableName(), newTable);
  }
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