@Test
  public void testAlterPartitionsWithEnvironmentCtxNullDbName() throws Exception {
    createTable4PartColsParts(client);
    Partition part = client.listPartitions(DB_NAME, TABLE_NAME, (short)-1).get(0);
    try {
      client.alter_partitions(null, TABLE_NAME, Lists.newArrayList(part), new EnvironmentContext());
      Assert.fail("Expected exception");
    } catch (MetaException | TProtocolException ex) {
    }
  }
Testing
   alter_partitions(String,String,List(Partition),EnvironmentContext) ->
   alter_partitions_with_environment_context(String,String,List(Partition),EnvironmentContext).
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java