@Test
  public void testAddPartitionSpecWithSharedSDChangeRootPath() throws Exception {

    Table table = createTable();
    String rootPath = table.getSd().getLocation() + "/addPartSpecRootPath/";
    String rootPath1 = table.getSd().getLocation() + "/someotherpath/";

    PartitionWithoutSD partition = buildPartitionWithoutSD(Lists.newArrayList("2014"), 0);
    PartitionSpecProxy partitionSpecProxy =
        buildPartitionSpecWithSharedSD(Lists.newArrayList(partition), buildSD(rootPath));
    partitionSpecProxy.setRootLocation(rootPath1);
    client.add_partitions_pspec(partitionSpecProxy);

    Partition resultPart = client.getPartition(DB_NAME, TABLE_NAME, Lists.newArrayList("2014"));
    Assert.assertEquals(rootPath1 + "partwithoutsd0", resultPart.getSd().getLocation());
  }
Tests for creating partitions from partition spec.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitionsFromPartSpec.java