@Test(expected = NoSuchObjectException.class)
  public void testListPartitionsSpecByExprNoDb() throws Exception {
    getClient().dropDatabase(DB_NAME);

    PartitionsByExprRequest req = new PartitionsByExprRequest(DB_NAME, TABLE_NAME,
            ByteBuffer.wrap(new byte[] {'f', 'o', 'o'}));
    req.setMaxParts((short)-1);

    getClient().listPartitionsSpecByExpr(req, null);
  }
Test class for list partitions related methods on temporary tables.
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSessionHiveMetastoreClientListPartitionsTempTable.java