@Test
  public void testInvalidIndexes() throws Exception {
    // Task ID: ICM15
    QueryService qs;
    qs = CacheUtils.getQueryService();
    try {
      Index i1 = qs.createIndex("r1Index", IndexType.FUNCTIONAL, "secId",
          SEPARATOR + "portfolios.toArray[1].positions.values");
      CacheUtils.log(((RangeIndex) i1).dump());
      fail("Index creation should have failed");
    } catch (Exception ignored) {
    }
    try {
      Index i2 = qs.createIndex("r12Index", IndexType.FUNCTIONAL, "secId",
          SEPARATOR + "portfolios.asList[1].positions.values");
      CacheUtils.log(((RangeIndex) i2).dump());
      fail("Index creation should have failed");
    } catch (Exception ignored) {
    }
  }
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