@Test
  public void testAlterTableNullNewTable() throws Exception {
    Table originalTable = testTables[0];
    try {
      client.alter_table(originalTable.getDbName(), originalTable.getTableName(), null);
      // TODO: Should be checked on server side. On Embedded metastore it throws
      // NullPointerException, on Remote metastore it throws TTransportException
      Assert.fail("Expected a NullPointerException or TTransportException to be thrown");
    } catch (NullPointerException exception) {
      // Expected exception - Embedded MetaStore
    } catch (TProtocolException exception) {
      // Expected exception - Remote MetaStore
    }
  }
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