@Test
  public void testPRRRNonLocalQueryingWithNoRROnOneNode() throws Exception {
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    setCacheInVMs(vm0, vm1);

    // Creating PR's on the participating VM's
    // Creating DataStore node on the VM0.
    vm0.invoke(
        prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(name, 0, Portfolio.class));
    vm1.invoke(
        prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(name, 0, Portfolio.class));

    // Creating Colocated Region DataStore node on the VM0.
    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForLocalRegionCreation(coloName,
        NewPortfolio.class));

    Portfolio[] portfolio = createPortfoliosAndPositions(cntDest);
    NewPortfolio[] newPortfolio = createNewPortfoliosAndPositions(cntDest);

    // Putting the data into the PR's created
    vm0.invoke(
        prQueryDUnitHelper.getCacheSerializableRunnableForPRPuts(name, portfolio, cnt, cntDest));
    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRPuts(coloName, newPortfolio, cnt,
        cntDest));

    // querying the VM for data and comparing the result with query result of local region.
    vm0.invoke(() -> {
      Cache cache = getCache();

      String[] queries = new String[] {"r1.ID = r2.id",};

      Object[][] r = new Object[queries.length][2];
      Region region = null;
      region = cache.getRegion(name);
      assertNotNull(region);
      region = cache.getRegion(coloName);
      assertNotNull(region);

      QueryService qs = getCache().getQueryService();
      Object[] params;
      try {
        for (int j = 0; j < queries.length; j++) {
          getCache().getLogger().info("About to execute local query: " + queries[j]);
          Function func = new TestQueryFunction("testfunction");

          Object funcResult = FunctionService
              .onRegion((getCache().getRegion(name) instanceof PartitionedRegion)
                  ? getCache().getRegion(name) : getCache().getRegion(coloName))
              .setArguments("Select " + (queries[j].contains("ORDER BY") ? "DISTINCT" : "")
                  + " * from " + SEPARATOR + name + " r1, " + SEPARATOR + coloName + " r2 where "
                  + queries[j])
              .execute(func).getResult();

          r[j][0] = ((ArrayList) funcResult).get(0);
        }
        fail("Expected RegionNotFoundException wrapped in FunctionException");

      } catch (FunctionException e) {
        if (!(e.getCause() instanceof RegionNotFoundException)) {
          throw e;
        }
      }
    });
  }
1. Creates two PR Data Stores with redundantCopies = 1.

<p>
2. Populates the region with test data.

<p>
3. Fires a LOCAL query on one data store VM and verifies the result.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java