@Test
  public void testBug36421_part4() throws Exception {
    qs.createIndex("pkIndex", IndexType.PRIMARY_KEY, "pk", SEPARATOR + "pos");
    QueryObserverImpl observer = new QueryObserverImpl();
    QueryObserverHolder.setInstance(observer);
    SelectResults rs = CacheUtils.getRegion(SEPARATOR + "pos").query("pk = '2'");
    if (!observer.isIndexesUsed) {
      fail("Index not uesd for operator '='");
    }
    assertTrue(rs.size() == 1);
    assertTrue(((Portfolio) rs.iterator().next()).pkid.equals("2"));
    assertTrue(observer.indexesUsed.get(0).equals("pkIndex"));
    CacheUtils.getRegion(SEPARATOR + "pos").put("7", new Portfolio(7));
    observer = new QueryObserverImpl();
    QueryObserverHolder.setInstance(observer);
    rs = CacheUtils.getRegion(SEPARATOR + "pos").query("pk = '7'");
    if (!observer.isIndexesUsed) {
      fail("Index not used for operator '='");
    }
    assertTrue(rs.size() == 1);
    assertTrue(((Portfolio) rs.iterator().next()).pkid.equals("7"));
    assertTrue(observer.indexesUsed.get(0).equals("pkIndex"));
  }
Test to check if Region short cut method is used for querying, the Primary key index
utilization occurs or not
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexUseJUnitTest.java