@Test
  public void testCreatePartitionedIndexWithKeysValuesAndFunction() throws Exception {
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    setCacheInVMs(vm0, vm1);

    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(PARTITIONED_REGION_NAME,
        redundancy, PortfolioData.class));

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

    vm1.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(PARTITIONED_REGION_NAME,
        redundancy, PortfolioData.class));

    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRPuts(PARTITIONED_REGION_NAME,
        portfolio, cnt, cntDest));

    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRIndexCreate(
        PARTITIONED_REGION_NAME, "index8", "k", SEPARATOR + PARTITIONED_REGION_NAME + ".keys k",
        ""));
    vm1.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRIndexCreate(
        PARTITIONED_REGION_NAME, "index7", "nvl(k.status.toString(),'nopes')",
        SEPARATOR + PARTITIONED_REGION_NAME + ".values k", ""));

    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRPuts(PARTITIONED_REGION_NAME,
        portfolio, cnt, cntDest));
  }
Creates partitioned index on keys and values of a bucket regions.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java