@Test
  public void testNullMapKeyCompactRangeIndex() throws Exception {
    index = utils.createIndex("indexName", "positions[*]", SEPARATOR + "exampleRegion");
    Region region = utils.getCache().getRegion("exampleRegion");

    // create objects
    int numObjects = 10;
    for (int i = 1; i <= numObjects; i++) {
      Portfolio p = new Portfolio(i);
      p.status = null;
      p.getPositions().put(null, "something");
      region.put("KEY-" + i, p);
    }
    // execute query and check result size
    QueryService qs = utils.getCache().getQueryService();
    SelectResults results = (SelectResults) qs
        .newQuery(
            "Select * from " + SEPARATOR + "exampleRegion r where r.position[null] = something")
        .execute();
    assertEquals("Null matched Results expected", numObjects, results.size());
  }
Tests adding entries to compact range index where the the key of an indexed map field is null.
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/CompactRangeIndexJUnitTest.java