private void verifyPartitionSharedSD(Table table, String name, List<String> values, int index)
      throws Exception {

    Partition part = client.getPartition(table.getDbName(), table.getTableName(), name);
    Assert.assertNotNull(part);
    Assert.assertEquals(table.getTableName(), part.getTableName());
    List<String> partValues = part.getValues();
    Assert.assertEquals(values.size(), partValues.size());
    Assert.assertTrue(partValues.containsAll(values));
    Assert.assertEquals(table.getDbName(), part.getDbName());
    Assert.assertEquals(DEFAULT_CREATE_TIME, part.getLastAccessTime());
    Assert.assertEquals(DEFAULT_PARAM_VALUE + index,
        part.getParameters().get(DEFAULT_PARAM_KEY + index));
    Assert.assertFalse(part.getParameters().keySet().contains(table.getParameters().keySet()));
    StorageDescriptor sd = part.getSd();
    Assert.assertNotNull(sd);
    Assert.assertEquals("TestInputFormat", sd.getInputFormat());
    Assert.assertEquals("TestOutputFormat", sd.getOutputFormat());
    Assert.assertEquals("sharedSDPartSerde", sd.getSerdeInfo().getName());
    Assert.assertEquals("testSDParamValue", sd.getParameters().get("testSDParamKey"));
    Assert.assertEquals(
        metaStore.getWarehouseRoot() + "/" + TABLE_NAME + "/sharedSDTest/partwithoutsd" + index,
        sd.getLocation());
    Assert.assertTrue(metaStore.isPathExists(new Path(sd.getLocation())));
  }
Tests for creating partitions from partition spec.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitionsFromPartSpec.java