private void validateBasic(GetPartitionsResponse response) throws TException {
    Assert.assertNotNull("Response is null", response);
    Assert.assertNotNull("Returned partition spec is null", response.getPartitionSpec());
    Assert.assertEquals(1, response.getPartitionSpecSize());
    PartitionSpecWithSharedSD partitionSpecWithSharedSD =
        response.getPartitionSpec().get(0).getSharedSDPartitionSpec();
    Assert.assertNotNull(partitionSpecWithSharedSD.getSd());
    StorageDescriptor sharedSD = partitionSpecWithSharedSD.getSd();
    Assert.assertEquals("Root location should be set to table location", tbl.getSd().getLocation(),
        sharedSD.getLocation());

    List<PartitionWithoutSD> partitionWithoutSDS = partitionSpecWithSharedSD.getPartitions();
    Assert.assertEquals(origPartitions.size(), partitionWithoutSDS.size());
    for (int i = 0; i < origPartitions.size(); i++) {
      Partition origPartition = origPartitions.get(i);
      PartitionWithoutSD returnedPartitionWithoutSD = partitionWithoutSDS.get(i);
      Assert.assertEquals(String.format("Location returned for Partition %d is not correct", i),
          origPartition.getSd().getLocation(),
          sharedSD.getLocation() + returnedPartitionWithoutSD.getRelativePath());
    }
  }
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