@Override
  protected Partition createPartition(String tableName, String location, List<String> values,
      List<FieldSchema> partCols, Map<String, String> partParams) throws Exception {
    new PartitionBuilder().setDbName(DB_NAME).setTableName(tableName).setValues(values).setCols(partCols)
        .setLocation(location).setPartParams(partParams).addToTable(getClient(), conf);
    Partition partition = getClient().getPartition(DB_NAME, tableName, values);
    return partition;
  }
Test class for delete partitions related methods on temporary tables.
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSessionHiveMetastoreClientDropPartitionsTempTable.java