@Test
  public void testRemoteException() throws Exception {
    setCacheInVMs(vm0, vm1);

    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCreateLimitedBuckets(
        PARTITIONED_REGION_NAME, redundancy, numOfBuckets));
    vm1.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCreateLimitedBuckets(
        PARTITIONED_REGION_NAME, redundancy, numOfBuckets));

    // creating a local region on one of the JVM's
    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForLocalRegionCreation(
        LOCAL_REGION_NAME, PortfolioData.class));

    // Putting the data into the accessor node
    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRPuts(PARTITIONED_REGION_NAME,
        portfolio, CNT, CNT_DEST));

    // Putting the same data in the local region created
    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRPuts(LOCAL_REGION_NAME,
        portfolio, CNT, CNT_DEST));

    // Insert the test hooks on local and remote node.
    // Test hook on remote node will throw CacheException while Test hook on local node will throw
    // QueryException.
    vm1.invoke(() -> {
      QueryObserverHolder.setInstance(new RuntimeExceptionQueryObserver("vm1"));
    });

    vm0.invoke(() -> {
      DefaultQuery query = (DefaultQuery) PRQueryDUnitHelper.getCache().getQueryService()
          .newQuery("Select * from " + SEPARATOR + PARTITIONED_REGION_NAME);
      assertThatThrownBy(query::execute).isInstanceOf(RuntimeException.class)
          .hasMessageContaining("vm1");
    });
  }
1. Creates PR regions across with scope = DACK, 2 data-stores
<p>
2. Creates a Local region on one of the VM's
<p>
3. Puts in the same data both in PR region & the Local Region
<p>
4. Queries the data both in local & PR
<p>
5. Puts a QueryObservers in both local as well as remote data-store node, to throw some test
exceptions.
<p>
6. then re-executes the query on one of the data-store node.
<p>
7. Verifies the exception thrown is from local node not from remote node
<p>
geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRQueryRemoteNodeExceptionDUnitTest.java