@Test
  public void testQueryRVMapMultipleEntries() throws Exception {
    Cache cache = CacheUtils.getCache();
    QueryService queryService = CacheUtils.getCache().getQueryService();
    CacheUtils.createRegion("TEST_REGION", null);
    queryService.createIndex("tr.nested.id.index", "nested.id",
        SEPARATOR + "TEST_REGION, nested IN nested_values");
    Query queryInSet = queryService.newQuery(
        "SELECT DISTINCT tr.id FROM " + SEPARATOR
            + "TEST_REGION tr, tr.nested_values nested WHERE nested.id IN SET ('1')");
    Query queryEquals = queryService.newQuery(
        "SELECT DISTINCT tr.id FROM " + SEPARATOR
            + "TEST_REGION tr, nested IN nested_values WHERE nested.id='1'");

    Object[] nested =
        new Object[] {cache.createPdxInstanceFactory("nested_1").writeString("id", "1").create(),
            cache.createPdxInstanceFactory("nested_2").writeString("id", "1").create(),
            cache.createPdxInstanceFactory("nested_3").writeString("id", "1").create(),
            cache.createPdxInstanceFactory("nested_4").writeString("id", "4").create()};

    PdxInstance record = cache.createPdxInstanceFactory("root").writeString("id", "2")
        .writeObjectArray("nested_values", nested).create();

    cache.getRegion("TEST_REGION").put("100", record);
    Index index = cache.getQueryService().getIndex(cache.getRegion("TEST_REGION"),
        "mdf.testRegion.nested.id");
    SelectResults queryResults = (SelectResults) queryEquals.execute();
    SelectResults inSetQueryResults = (SelectResults) queryInSet.execute();
    assertEquals(queryResults.size(), inSetQueryResults.size());
    assertTrue(inSetQueryResults.size() > 0);
  }
Tests the query method of RangeIndex which just contains not equal keys. That is if the where
clause looks like a != 7 and a != 8 & a!=9
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/RangeIndexAPIJUnitTest.java