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

    createTable();
    List<Partition> partitions = null;
    PartitionSpecProxy partitionSpec = buildPartitionSpec(DB_NAME, TABLE_NAME, null, partitions);
    client.add_partitions_pspec(partitionSpec);
  }
Tests for creating partitions from partition spec.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitionsFromPartSpec.java