@Test
  public void testAlterPartitionWithEnvironmentCtxNullPartition() throws Exception {
    try {
      createTable4PartColsParts(client);
      List<Partition> partitions = client.listPartitions(DB_NAME, TABLE_NAME, (short) -1);
      client.alter_partition(DB_NAME, TABLE_NAME, null, new EnvironmentContext());
      fail("Should have thrown exception");
    } catch (NullPointerException | TTransportException e) {
      //TODO: should not throw different exceptions for different HMS deployment types
    }
  }
Testing alter_partition(String,String,Partition,EnvironmentContext) ->
        alter_partition_with_environment_context(String,String,Partition,EnvironmentContext).
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java