@Override
  @Test(expected = MetaException.class)
  public void testExchangePartitionsNonExistingPartLocation() throws Exception {
    Map<String, String> partitionSpecs = getPartitionSpec(getPartitions()[1]);
    getMetaStore().cleanWarehouseDirs();
    cleanTempTableDir(getSourceTable());
    cleanTempTableDir(getDestTable());
    getClient().exchange_partitions(partitionSpecs, getSourceTable().getDbName(),
        getSourceTable().getTableName(), getDestTable().getDbName(), getDestTable().getTableName());
  }
Test class for exchange partitions related methods on temporary tables.
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSessionHiveMetastoreClientExchangePartitionsTempTable.java