@Test
  public void testPartitionRegionDebugMessageQueryTraceOffRemoteServerOnly() throws Exception {
    vm0.invoke(this::createAccessor);
    vm1.invoke(this::createPartitionedRegion);
    vm2.invoke(this::createPartitionedRegion);
    vm1.invoke(this::createBuckets);

    vm1.invoke(() -> {
      DefaultQuery.testHook = new PRQueryTraceTestHook();
      DefaultQuery.QUERY_VERBOSE = false;
    });
    vm2.invoke(() -> {
      DefaultQuery.testHook = new PRQueryTraceTestHook();
      DefaultQuery.QUERY_VERBOSE = true;
    });

    vm1.invoke(() -> {
      Query query = cacheRule.getCache().getQueryService()
          .newQuery("select * from " + SEPARATOR + regionName + " r where r > 0");
      SelectResults results = (SelectResults) query.execute();
      assertThat(results.asSet()).containsExactly(1, 2, 3, 4, 5, 6, 7, 8, 9);
    });

    vm1.invoke(() -> {
      PRQueryTraceTestHook server1TestHookInVM1 = (PRQueryTraceTestHook) DefaultQuery.testHook;
      assertThat(server1TestHookInVM1.getHooks()
          .get(TestHook.SPOTS.PULL_OFF_PR_QUERY_TRACE_INFO)).isTrue();
      assertThat(server1TestHookInVM1.getHooks()
          .get(TestHook.SPOTS.CREATE_PR_QUERY_TRACE_STRING)).isNull();
      assertThat(server1TestHookInVM1.getHooks()
          .get(TestHook.SPOTS.CREATE_PR_QUERY_TRACE_INFO_FROM_LOCAL_NODE))
              .isNull();
    });
    vm2.invoke(() -> {
      PRQueryTraceTestHook server2TestHookInVM2 = (PRQueryTraceTestHook) DefaultQuery.testHook;
      assertThat(server2TestHookInVM2.getHooks()
          .get(DefaultQuery.TestHook.SPOTS.POPULATING_TRACE_INFO_FOR_REMOTE_QUERY))
              .isTrue();
      assertThat(server2TestHookInVM2.getHooks()
          .get(DefaultQuery.TestHook.SPOTS.CREATE_PR_QUERY_TRACE_INFO_FOR_REMOTE_QUERY))
              .isTrue();
    });
  }
Tests trace for PR queries when {@code <trace>} is NOT used and query verbose is set to false
on local but true on remote servers We don't output the string or do anything on the local
side, but we still pull off the object due to the remote server generating and sending it
over.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PRQueryDistributedTest.java