@SuppressWarnings("deprecation")
  @Test
  public void deprecatedCalls() throws Exception {
    String tableName = "deprecated_table";
    Table table = createTestTable(getClient(), DEFAULT_DATABASE_NAME, tableName, Arrays.asList("partcol"), false);
    addPartitions(getClient(), table, Arrays.asList("a0", "a1", "a2", "a3", "a4"));

    Partition newPart =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a0"));
    newPart.getParameters().put("test_key", "test_value");
    client.alter_partition(DEFAULT_DATABASE_NAME, tableName, newPart);

    Partition fetched =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a0"));
    Assert.assertEquals("test_value", fetched.getParameters().get("test_key"));

    newPart =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a1"));
    newPart.setLastAccessTime(3);
    Partition newPart1 =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a2"));
    newPart1.getSd().setLocation("somewhere");
    client.alter_partitions(DEFAULT_DATABASE_NAME, tableName, Arrays.asList(newPart, newPart1));
    fetched =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a1"));
    Assert.assertEquals(3L, fetched.getLastAccessTime());
    fetched =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a2"));
    Assert.assertTrue(fetched.getSd().getLocation().contains("somewhere"));

    newPart =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a3"));
    newPart.setValues(Collections.singletonList("b3"));
    client.renamePartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a3"), newPart);
    fetched =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("b3"));
    Assert.assertEquals(1, fetched.getValuesSize());
    Assert.assertEquals("b3", fetched.getValues().get(0));

    newPart =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a4"));
    newPart.getParameters().put("test_key", "test_value");
    EnvironmentContext ec = new EnvironmentContext();
    ec.setProperties(Collections.singletonMap("a", "b"));
    client.alter_partition(DEFAULT_DATABASE_NAME, tableName, newPart, ec);
    fetched =
        client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("a4"));
    Assert.assertEquals("test_value", fetched.getParameters().get("test_key"));
  }
Testing alter_partition(String,String,Partition) ->
        alter_partition_with_environment_context(String,String,Partition,null).
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java