@Test
  public void testHashIndexWithNullsForLocalRegion() throws Exception {
    createLocalRegion("portfolios");
    int numEntries = 200;
    int numIds = 100;
    for (int i = 0; i < numEntries; i++) {
      int id = i % numIds;
      Portfolio p = new Portfolio(id);
      if (id % 2 == 0) {
        p.status = null;
      }
      region.put("" + i, p);
    }

    helpTestHashIndexForQuery(
        "SELECT * FROM " + SEPARATOR + "portfolios p WHERE p.status = 'inactive'", "p.status",
        SEPARATOR + "portfolios p");
    qs.removeIndexes();
    observer = new MyQueryObserverAdapter();
    QueryObserverHolder.setInstance(observer);
    helpTestHashIndexForQuery(
        "SELECT * FROM " + SEPARATOR + "portfolios p WHERE p.status != 'inactive'",
        "p.status", SEPARATOR + "portfolios p");
    qs.removeIndexes();
    observer = new MyQueryObserverAdapter();
    QueryObserverHolder.setInstance(observer);
    helpTestHashIndexForQuery("SELECT * FROM " + SEPARATOR + "portfolios p WHERE p.status = null",
        "p.status",
        SEPARATOR + "portfolios p");
    qs.removeIndexes();
    observer = new MyQueryObserverAdapter();
    QueryObserverHolder.setInstance(observer);
    helpTestHashIndexForQuery("SELECT * FROM " + SEPARATOR + "portfolios p WHERE p.status != null",
        "p.status",
        SEPARATOR + "portfolios p");
  }
Tests that hash index with And query for local region
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java