@Test
  public void testCreateTableSettingId() throws Exception {
    String dbName = "createDb";
    String tblName = "createTbl";

    client.dropTable(dbName, tblName);
    silentDropDatabase(dbName);
    new DatabaseBuilder()
        .setName(dbName)
        .create(client, conf);

    Table table = new TableBuilder()
        .setDbName(dbName)
        .setTableName(tblName)
        .addCol("foo", "string")
        .addCol("bar", "string")
        .build(conf);
    table.setId(1);
    client.createTable(table);
  }
tests create table and partition and tries to drop the table without
droppping the partition
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java