@Test
  public void testBug50247_NonPersistentSenderWithPersistentRegion() {
    IgnoredException.addIgnoredException("could not get remote locator information");
    Integer lnPort = vm0.invoke(() -> createFirstLocatorWithDSId(1));
    createCacheInVMs(lnPort, vm4, vm5);

    vm4.invoke(() -> createSender("ln1", 2, true, 10, 100, false, false, null, false));
    assertThatThrownBy(() -> vm4.invoke(
        () -> createPartitionedRegionWithPersistence(getTestMethodName() + "_PR", "ln1", 1, 100)))
            .withFailMessage(
                "Expected GatewaySenderException with incompatible gateway sender ids and region")
            .hasRootCauseInstanceOf(GatewaySenderException.class)
            .hasStackTraceContaining("can not be attached to persistent region ");

    vm5.invoke(
        () -> createPartitionedRegionWithPersistence(getTestMethodName() + "_PR", "ln1", 1, 100));
    assertThatThrownBy(
        () -> vm5.invoke(() -> createSender("ln1", 2, true, 10, 100, false, false, null, false)))
            .withFailMessage(
                "Expected GatewaySenderException with incompatible gateway sender ids and region")
            .hasRootCauseInstanceOf(GatewaySenderException.class)
            .hasStackTraceContaining("can not be attached to persistent region ");
  }
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