@Test
  public void testAlterPartitionsUnknownPartition() throws Exception {
    Partition part1 = null;
    try {
      createTable4PartColsParts(client);
      Table t = client.getTable(DB_NAME, TABLE_NAME);
      PartitionBuilder builder = new PartitionBuilder();
      Partition part = builder.inTable(t).addValue("1111").addValue("11").addValue("11").build(metaStore.getConf());
      part1 = client.listPartitions(DB_NAME, TABLE_NAME, (short) -1).get(0);
      makeTestChangesOnPartition(part1);
      client.alter_partitions(DB_NAME, TABLE_NAME, Lists.newArrayList(part, part1));
      fail("Should have thrown InvalidOperationException");
    } catch (InvalidOperationException e) {
      part1 = client.listPartitions(DB_NAME, TABLE_NAME, (short) -1).get(0);
      assertPartitionUnchanged(part1, part1.getValues(), PARTCOL_SCHEMA);
    }
  }
Testing
   alter_partitions(String,String,List(Partition)) ->
   alter_partitions_with_environment_context(String,String,List(Partition),null).
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java