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

    createCacheInVMs(nyPort, vm2);
    vm2.invoke(() -> {
      createReceiver();
      createPartitionedRegion(getTestMethodName() + "_RR", null, 1, 100, isOffHeap());
    });

    createCacheInVMs(lnPort, vm4, vm5, vm6, vm7);
    asList(vm4, vm5, vm6, vm7).forEach(vm -> vm.invoke(() -> {
      createSender("ln", 2, false, 100, 10, false, false, null, true);
    }));
    startSenderInVMs("ln", vm4, vm5, vm6, vm7);

    String regionName = getTestMethodName() + "_PR";
    asList(vm4, vm5, vm6, vm7).forEach(vm -> vm.invoke(() -> {
      createPartitionedRegion(regionName, null, 3, 100, isOffHeap());
    }));
    asList(vm4, vm5).forEach(vm -> vm.invoke(() -> {
      addSenderThroughAttributesMutator(regionName, "ln");
    }));
    vm4.invoke(() -> waitForSenderRunningState("ln"));

    verifyNoGatewaySenderIdWarning(regionName);
    vm4.invoke(() -> doPuts(regionName, 10));
    verifyGatewaySenderIdWarning(regionName);

    // now add the sender on the other vms so they will be consistent
    asList(vm6, vm7).forEach(vm -> vm.invoke(() -> {
      addSenderThroughAttributesMutator(regionName, "ln");
    }));
    vm4.invoke(() -> doPuts(regionName, 10));
    verifyNoGatewaySenderIdWarning(regionName);
  }
Two VMs are part of the DS. One VM hosts a cache server while the other hosts a Receiver.
Expected: Cache.getCacheServers should only return the bridge server and not the Receiver.
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/misc/WanValidationsDUnitTest.java