@Test
  public void testPartitionProjectionExcludeParameters() throws Throwable {
    GetPartitionsRequest request = getGetPartitionsRequest();
    GetProjectionsSpec projectSpec = request.getProjectionSpec();
    projectSpec
        .setFieldList(Arrays.asList("dbName", "tableName", "catName", "parameters", "values"));
    projectSpec.setExcludeParamKeyPattern(EXCLUDE_KEY_PREFIX + "%");

    GetPartitionsResponse response = client.getPartitionsWithSpecs(request);

    PartitionSpecWithSharedSD partitionSpecWithSharedSD =
        response.getPartitionSpec().get(0).getSharedSDPartitionSpec();
    Assert.assertNotNull("All the partitions should be returned in sharedSD spec",
        partitionSpecWithSharedSD);
    PartitionListComposingSpec partitionListComposingSpec =
        response.getPartitionSpec().get(0).getPartitionList();
    Assert.assertNull("Partition list composing spec should be null", partitionListComposingSpec);
    for (PartitionWithoutSD retPartion : partitionSpecWithSharedSD.getPartitions()) {
      Assert.assertFalse("excluded parameter key is found in the response",
          retPartion.getParameters().containsKey(EXCLUDE_KEY_PREFIX + "key1"));
      Assert.assertFalse("excluded parameter key is found in the response",
          retPartion.getParameters().containsKey(EXCLUDE_KEY_PREFIX + "key2"));
    }
  }
Confirms if the partitionWithoutSD object at partitionWithoutSDSIndex index has all the
projected fields set to values which are same as the ones set in origPartitions
@param projectedFields
@param sharedSD
@param partitionWithoutSDS
@param partitionWithoutSDSIndex
@throws IllegalAccessException
@throws InvocationTargetException
@throws NoSuchMethodException
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestGetPartitionsUsingProjectionAndFilterSpecs.java