@Test
  public void testAlterTableNullTableName() throws Exception {
    Table originalTable = testTables[0];
    Table newTable = originalTable.deepCopy();

    try {
      client.alter_table(originalTable.getDbName(), null, newTable);
      Assert.fail("Expected exception");
    } catch (MetaException | TProtocolException ex) {
      // Expected.
    }
  }
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