@Test
  public void testCreatePartitionedIndexThroughXML() throws Exception {
    IgnoredException ignoredException =
        IgnoredException.addIgnoredException(IndexNameConflictException.class.getName());

    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);

    closeCache();

    String fileName = "PRIndexCreation.xml";
    setCacheInVMsUsingXML(fileName, vm0, vm1);

    AsyncInvocation<Void> async0 = vm0.invokeAsync(
        prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(PARTITIONED_REGION_NAME));
    AsyncInvocation<Void> async1 = vm1.invokeAsync(
        prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(PARTITIONED_REGION_NAME));

    async0.await();
    async1.await();

    ignoredException.remove();

    // printing all the indexes are created.
    vm0.invoke(prQueryDUnitHelper
        .getCacheSerializableRunnableForIndexCreationCheck(PARTITIONED_REGION_NAME));
    vm1.invoke(prQueryDUnitHelper
        .getCacheSerializableRunnableForIndexCreationCheck(PARTITIONED_REGION_NAME));
  }
Creates partitioned index from an xml description.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java