@Test
  public void testIndexUsageIfIndexesGreaterThanFieldsInQueryWhereClauseWithOneIterator()
      throws Exception {
    AttributesFactory af = new AttributesFactory();
    af.setValueConstraint(Portfolio.class);
    RegionAttributes ra = af.createRegionAttributes();
    Region region = CacheUtils.getCache().createRegion("pos", ra);
    for (int i = 0; i < 4; i++) {
      region.put("" + i, new Portfolio(i));
    }
    executeQuery_1(region, true /* chcek referential integrity */);
    region.destroyRegion();
    CacheUtils.closeCache();
    CacheUtils.restartCache();
    af = new AttributesFactory();
    af.setValueConstraint(Portfolio.class);

    PartitionAttributesFactory pfa = new PartitionAttributesFactory();

    pfa.setRedundantCopies(0);
    pfa.setTotalNumBuckets(1);
    af.setPartitionAttributes(pfa.create());
    ra = af.createRegionAttributes();
    region = CacheUtils.getCache().createRegion("pos", ra);

    for (int i = 0; i < 4; i++) {
      Portfolio x = new Portfolio(i);
      region.put("" + i, x);
    }
    executeQuery_1(region, false/* chcek referential integrity */);
    region.destroyRegion();

  }
Test index usage on PR region & Local region if the total number of indexes created are more
than the fields used in the where clause of the query and the number of from clause iterators
is One
geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/IndexWithSngleFrmAndMultCondQryJUnitTest.java