protected void assertPartitionUnchanged(Partition partition, List<String> testValues,
                                               List<String> partCols) throws Exception {
    assertFalse(partition.getParameters().containsKey("hmsTestParam001"));

    List<String> expectedKVPairs = new ArrayList<>();
    for (int i = 0; i < partCols.size(); ++i) {
      expectedKVPairs.add(partCols.get(i) + "=" + testValues.get(i));
    }
    String partPath = expectedKVPairs.stream().collect(joining("/"));
    assertTrue(partition.getSd().getLocation().equals(metaStore.getExternalWarehouseRoot()
        + "/testpartdb.db/testparttable/" + partPath));
    assertNotEquals(NEW_CREATE_TIME, partition.getCreateTime());
    assertNotEquals(NEW_CREATE_TIME, partition.getLastAccessTime());
    assertEquals(2, partition.getSd().getCols().size());
  }
API tests for HMS client's  alterPartitions methods.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java