@Test
  public void testMapKeyIndexCreation_2_NonCompactType() throws Exception {
    QueryService qs;
    qs = CacheUtils.getQueryService();
    Index i1 = qs.createIndex("Index1", IndexType.FUNCTIONAL, "pf.positions['key1','key2','key3']",
        SEPARATOR + "portfolios pf");
    assertEquals(i1.getCanonicalizedIndexedExpression(),
        "index_iter1.positions['key1','key2','key3']");
    assertTrue(i1 instanceof CompactMapRangeIndex);
    CompactMapRangeIndex mri = (CompactMapRangeIndex) i1;
    Object[] mapKeys = mri.getMapKeysForTesting();
    assertEquals(mapKeys.length, 3);
    Set<String> keys = new HashSet<>();
    keys.add("key1");
    keys.add("key2");
    keys.add("key3");
    for (Object key : mapKeys) {
      keys.remove(key);
    }
    assertTrue(keys.isEmpty());
    String[] patterns = mri.getPatternsForTesting();
    assertEquals(patterns.length, 3);
    Set<String> patternsSet = new HashSet<>();
    patternsSet.add("index_iter1.positions['key1']");
    patternsSet.add("index_iter1.positions['key2']");
    patternsSet.add("index_iter1.positions['key3']");
    for (String ptrn : patterns) {
      patternsSet.remove(ptrn);
    }
    assertTrue(patternsSet.isEmpty());
    assertEquals(mri.getIndexedExpression(), "pf.positions['key1','key2','key3']");
  }
Test the Index maiantenance as it may use the method keys() of QRegion instead of DummyQRegion
while running an IndexMaintenanceQuery
geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/IndexCreationJUnitTest.java