@Test(expected=MetaException.class)
  public void testAddPartitionSpecWithSharedSDNoValue() throws Exception {

    Table table = createTable();
    PartitionWithoutSD partition = new PartitionWithoutSD();
    partition.setRelativePath("addpartspectest");
    String location = table.getSd().getLocation() + "/nullValueTest/";
    PartitionSpecProxy partitionSpecProxy =
        buildPartitionSpecWithSharedSD(Lists.newArrayList(partition), buildSD(location));
    client.add_partitions_pspec(partitionSpecProxy);
  }
Tests for creating partitions from partition spec.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitionsFromPartSpec.java