@Test
  public void test008NullCollectionField() {

    /*
     * This test relies on the static Position counter starting at the same value each time.
     * By starting the counter at a well-defined value, this test can be run more than once
     * in the same JVM.
     * Because of its reliance on that static counter, this test cannot be run in parallel.
     */
    Position.resetCounter();

    Region region = CacheUtils.createRegion("Portfolios", Portfolio.class);
    for (int i = 0; i < 10; i++) {
      Portfolio p = new Portfolio(i);
      if (i % 2 == 0) {
        p.positions = null;
      }
      region.put("key-" + i, p);
    }

    String queryStr = "select * from " + region.getFullPath() + " p where p.positions = NULL ";

    Query q = CacheUtils.getQueryService().newQuery(queryStr);
    SelectResults sr = null;
    try {
      sr = (SelectResults) q.execute();
    } catch (Exception e) {
      fail("Query execution failed " + e);
    }
    assertEquals("Incorrect result size ", 5, sr.size());

    queryStr = "select * from " + region.getFullPath()
        + " p, p.positions.values pos  where pos.secId = 'APPL' ";

    q = CacheUtils.getQueryService().newQuery(queryStr);
    try {
      sr = (SelectResults) q.execute();
    } catch (Exception e) {
      fail("Query execution failed " + e);
    }
    assertEquals("Incorrect result size ", 2, sr.size());
  }
***
THIS FILE IS ENCODED IN UTF-8 IN ORDER TO TEST UNICODE IN FIELD NAMES. THE ENCODING MUST BE
SPECIFIED AS UTF-8 WHEN COMPILED
*****
geode-core/src/integrationTest/java/org/apache/geode/cache/query/QueryJUnitTest.java