@Test
  public void testPRMultiIndexCreation() throws Exception {
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    VM vm2 = host.getVM(2);
    VM vm3 = host.getVM(3);
    setCacheInVMs(vm0, vm1, vm2, vm3);

    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRAccessorCreate(
        PARTITIONED_REGION_NAME, redundancy, PortfolioData.class));
    vm1.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(PARTITIONED_REGION_NAME,
        redundancy, PortfolioData.class));
    vm2.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(PARTITIONED_REGION_NAME,
        redundancy, PortfolioData.class));
    vm3.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(PARTITIONED_REGION_NAME,
        redundancy, PortfolioData.class));

    PortfolioData[] portfolio = createPortfolioData(cnt, cntDest);

    // Putting the data into the PR's created
    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRPuts(PARTITIONED_REGION_NAME,
        portfolio, cnt, cntDest));

    // should create a successful index.
    vm1.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRIndexCreate(
        PARTITIONED_REGION_NAME, "PrIndexOnStatus", "p.status", null, "p"));

    // creating a duplicate index should throw a IndexExistsException
    vm1.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRIndexCreate(
        PARTITIONED_REGION_NAME, "PrIndexOnID", "p.ID", null, "p"));
  }
Tests creation of multiple index creation on a partitioned region system.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java