@Override
  protected Table createTable(String dbName, String tableName, List<FieldSchema> partCols, String location)
      throws Exception {
    new TableBuilder().setDbName(dbName).setTableName(tableName).addCol("test_id", "int", "test col id")
        .addCol("test_value", "string", "test col value")
        .addTableParam("partTestTableParamKey", "partTestTableParamValue").setPartCols(partCols)
        .addStorageDescriptorParam("partTestSDParamKey", "partTestSDParamValue").setSerdeName(tableName)
        .setStoredAsSubDirectories(false).addSerdeParam("partTestSerdeParamKey", "partTestSerdeParamValue")
        .setLocation(location).setTemporary(true).create(getClient(), conf);
    return getClient().getTable(dbName, tableName);
  }
Test class for adding partitions from partition spec related methods on temporary tables.
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSessionHiveMetastoreClientAddPartitionsFromSpecTempTable.java