@Test
  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
    // create locator on local site
    Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
    // create locator on remote site
    Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));

    // create cache in remote site
    createCacheInVMs(nyPort, vm2, vm3);

    // create cache in local site
    createCacheInVMs(lnPort, vm4, vm5);
    vm4.invoke(() -> setNumDispatcherThreadsForTheRun(2));
    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));

    // create senders with disk store
    vm4.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
        true, 100, 10, false, true, null, null, true));
    String diskStore2 = vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
        true, 100, 10, false, true, null, null, true));

    // create PR on remote site
    vm2.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
        13, isOffHeap()));
    vm3.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
        13, isOffHeap()));

    // create PR on local site
    vm4.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
        13, isOffHeap()));
    vm5.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
        13, isOffHeap()));

    // start the senders on local site
    startSenderInVMs("ln", vm4, vm5);

    // wait for senders to become running
    vm4.invoke("Waiting for senders running.", waitForSenderRunnable());
    vm5.invoke("Waiting for senders running.", waitForSenderRunnable());

    // start puts in region on local site
    vm4.invoke("Do puts to the region", () -> WANTestBase.doPuts(getTestMethodName(), 10));

    // --------------------close and rebuild local site
    // -------------------------------------------------
    // kill the sender in vm5
    vm5.invoke("Kill sender.", killSenderRunnable());

    // restart the vm
    vm5.invoke("Create back the cache", () -> createCache(lnPort));
    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));

    // create senders with disk store
    vm5.invoke("Create sender back from the disk store.",
        () -> WANTestBase.createSenderWithDiskStore("ln", 2, true, 100, 10, false, true,
            null, diskStore2, false));

    // create PR on local site
    vm5.invoke("Create back the partitioned region",
        () -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
            13, isOffHeap()));

    // wait for senders running
    vm5.invoke("Waiting for senders running.", waitForSenderRunnable());

    // ----------------------------------------------------------------------------------------------------

    vm4.invoke(() -> WANTestBase.stopSender("ln"));
    vm5.invoke(() -> WANTestBase.stopSender("ln"));

    vm5.invoke(killSenderRunnable());

    vm4.invoke(() -> WANTestBase.startSender("ln"));


    createReceiverInVMs(vm2, vm3);

    vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 10));
    vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 10));
  }
Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
then stop gateway sender, and stop server. After that create receiver on remote site.
Check if the remote site receives all the events.
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java