@Test
  public void testAlterPartitionsCheckRollbackChangeDBName() throws Exception {
    createTable4PartColsParts(getClient());
    List<Partition> oldPartitions = getClient().listPartitions(DB_NAME, TABLE_NAME, (short) -1);
    Partition newPart1 = new Partition(oldPartitions.get(3));
    newPart1.setDbName(DB_NAME + "_changed");
    assertPartitionRollback(oldPartitions, Lists.newArrayList(oldPartitions.get(0), oldPartitions.get(1), newPart1,
        oldPartitions.get(2)));
  }
Test class for alter/rename partitions related methods on temporary tables.
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSessionHiveMetastoreClientAlterPartitionsTempTable.java