@Test
  public void testDroppedEventsSignalizationToSecondaryQueueWhileSenderStopped() {
    int lnPort = vm0.invoke(() -> createFirstLocatorWithDSId(1));
    int nyPort = vm1.invoke(() -> createFirstRemoteLocator(2, lnPort));

    createSendersReceiversAndPartitionedRegion(lnPort, nyPort, false, true);

    // make sure all the senders are running before doing any puts
    waitForSendersRunning();

    // FIRST RUN: now, the senders are started. So, start the puts
    vm4.invoke(() -> doPuts(getUniqueName() + "_PR", 100));

    vm2.invoke(() -> validateRegionSizeRemainsSame(getUniqueName() + "_PR", 100));

    stopSenders();

    waitForAllSendersNotRunning();

    vm4.invoke(() -> {
      DistributionMessageObserver.setInstance(new CountSentPQRMObserver());
    });
    vm5.invoke(() -> {
      DistributionMessageObserver.setInstance(new CountSentPQRMObserver());
    });
    vm6.invoke(() -> {
      DistributionMessageObserver.setInstance(new CountSentPQRMObserver());
    });
    vm7.invoke(() -> {
      DistributionMessageObserver.setInstance(new CountSentPQRMObserver());
    });

    // SECOND RUN: keep one thread doing puts to the region
    vm4.invoke(() -> doPutsFrom(getUniqueName() + "_PR", 100, 200));

    vm2.invoke(() -> validateRegionSizeRemainsSame(getUniqueName() + "_PR", 100));

    int parallelQueueRemovalMessageCountInVm4 = vm4.invoke(() -> {
      CountSentPQRMObserver observer =
          (CountSentPQRMObserver) DistributionMessageObserver.getInstance();
      return observer.getNumberOfSentPQRM();
    });

    int parallelQueueRemovalMessageCountInVm5 = vm5.invoke(() -> {
      CountSentPQRMObserver observer =
          (CountSentPQRMObserver) DistributionMessageObserver.getInstance();
      return observer.getNumberOfSentPQRM();
    });

    int parallelQueueRemovalMessageCountInVm6 = vm6.invoke(() -> {
      CountSentPQRMObserver observer =
          (CountSentPQRMObserver) DistributionMessageObserver.getInstance();
      return observer.getNumberOfSentPQRM();
    });

    int parallelQueueRemovalMessageCountInVm7 = vm7.invoke(() -> {
      CountSentPQRMObserver observer =
          (CountSentPQRMObserver) DistributionMessageObserver.getInstance();
      return observer.getNumberOfSentPQRM();
    });

    assertThat(parallelQueueRemovalMessageCountInVm4 + parallelQueueRemovalMessageCountInVm5
        + parallelQueueRemovalMessageCountInVm6 + parallelQueueRemovalMessageCountInVm7)
            .isEqualTo(100);

    await().untilAsserted(() -> {
      assertThat(vm4.invoke(() -> getSecondaryQueueSizeInStats("ln"))).isZero();
      assertThat(vm5.invoke(() -> getSecondaryQueueSizeInStats("ln"))).isZero();
      assertThat(vm6.invoke(() -> getSecondaryQueueSizeInStats("ln"))).isZero();
      assertThat(vm7.invoke(() -> getSecondaryQueueSizeInStats("ln"))).isZero();
    });

  }
Put entries in region after gateway sender is stopped. Count number of PQRM messages sent.
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDistributedTest.java