private void checkPartitionNames(int numParts, List<String> partVals) throws Exception {
    GetPartitionNamesPsRequest request = new GetPartitionNamesPsRequest();
    request.setDbName(DB_NAME);
    request.setTblName(TABLE_NAME);
    request.setPartValues(partVals);
    request.setMaxParts((short)-1);
    List<String> partNames = getClient().listPartitionNamesRequest(request).getNames();
    assertTrue(partNames.size() == numParts);
  }
Test class for list partitions related methods on temporary tables.
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSessionHiveMetastoreClientListPartitionsTempTable.java