@Test
  public void queryWithOrClauseShouldReturnCorrectResultSet() throws Exception {
    String query =
        "SELECT DISTINCT p1.ID FROM " + SEPARATOR
            + "pos p1 where p1.ID IN SET (0,1) OR p1.status = 'active'";

    Query q = qs.newQuery(query);
    QueryObserverImpl observer = new QueryObserverImpl();
    QueryObserverHolder.setInstance(observer);
    SelectResults sr = (SelectResults) q.execute();
    if (!observer.isIndexesUsed) {
      fail("Index should have been used for query '" + q.getQueryString() + "'");
    }

    assertEquals(sr.size(), 3);
    qs.removeIndexes();
  }
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