@Test
  public void testQueryWithNullProjectionValue() throws Exception {
    Region region = PartitionedRegionTestHelper.createPartitionedRegion(regionName, "100", 0);
    int size = 10;
    HashMap value = null;
    for (int j = 0; j < size; j++) {
      value = new HashMap();
      value.put("account" + j, "account" + j);
      region.put("" + j, value);
    }

    String queryString = "Select p.get('account') from " + SEPARATOR + region.getName() + " p ";
    Query query = region.getCache().getQueryService().newQuery(queryString);
    SelectResults sr = (SelectResults) query.execute();
    Assert.assertTrue(sr.size() == size);

    PRQueryProcessor.TEST_NUM_THREADS = 10;
    try {
      queryString = "Select p.get('acc') from " + SEPARATOR + region.getName() + " p ";
      query = region.getCache().getQueryService().newQuery(queryString);
      sr = (SelectResults) query.execute();
      Assert.assertTrue(sr.size() == 10);
      for (Object r : sr.asList()) {
        if (r != null) {
          fail("Expected null value, but found " + r);
        }
      }
    } finally {
      PRQueryProcessor.TEST_NUM_THREADS = 0;
      region.close();
    }
  }
Tests the execution of query on a PartitionedRegion created on a single data store. <br>
1. Creates a PR with redundancy=0 on a single VM. 2. Puts some test Objects in cache. 3. Fires
queries on the data and verifies the result.
geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryNumThreadsJUnitTest.java