@Override
  protected Table createTable(String tableName, List<FieldSchema> partCols, Map<String, String> tableParams)
      throws Exception {
    TableBuilder builder =
        new TableBuilder().setDbName(DB_NAME).setTableName(tableName).addCol("test_id", "int", "test col id")
            .addCol("test_value", "string", "test col value").setPartCols(partCols)
            .setLocation(getMetaStore().getWarehouseRoot() + "/" + tableName).setTemporary(true);
    if (tableParams != null) {
      builder.setTableParams(tableParams);
    }
    return builder.create(getClient(), conf);
  }
Test class for delete partitions related methods on temporary tables.
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSessionHiveMetastoreClientDropPartitionsTempTable.java