private static Region<?, ?> createPartitionedRegion(String regionName, Cache cache,
      Class keyConstraint, Class valueConstraint) {
    RegionFactory regionFactory = cache.createRegionFactory();
    regionFactory.setDataPolicy(DataPolicy.PARTITION);
    regionFactory.setKeyConstraint(keyConstraint);
    regionFactory.setValueConstraint(valueConstraint);
    return regionFactory.create(regionName);
  }
this test class test: CreateIndexCommand, DestroyIndexCommand, ListIndexCommand
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommandsIntegrationTestBase.java