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

    createTable(DB_NAME, TABLE_NAME, getYearPartCol(),
        metaStore.getWarehouseRoot() + "/" + TABLE_NAME);

    Partition partition = buildPartition(Lists.newArrayList("2002"), getYearPartCol(), 1);
    PartitionWithoutSD partitionWithoutSD = buildPartitionWithoutSD(Lists.newArrayList("2002"), 0);
    PartitionSpecProxy partitionSpecProxy =
        buildPartitionSpec(Lists.newArrayList(partition), Lists.newArrayList(partitionWithoutSD));
    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