@Test
  public void testNetSearchFailoverFromReplicate() {
    installListenerToDisconnectOnNetSearchRequest(vm0);
    logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate entered");
    createReplicate(vm0);
    logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate 1");

    createNormal(vm1);
    logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate 2");
    createNormal(vm2);
    logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate 3");
    createEmpty(vm3);
    logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate 4");

    put(vm3, "a", "b");
    logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate 5");

    assertThat("b").isEqualTo(get(vm3, "a"));
    logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate 6");

    vm0.invoke(() -> await("system to shut down")
        .untilAsserted(
            () -> {
              logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate 7");
              assertThat(InternalDistributedSystem.getConnectedInstance()).isNull();
              logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate 8");

            }));
    logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate 9");

    waitForListenerToFinish(vm0);
    logger.info("DBG GEODE-7474: testNetSearchFailoverFromReplicate finished");
  }
The system prefers net searching replicates. If a replicate fails after it responds to a query
message and before it returns a value, the system should fall back to net searching normal
members.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/NetSearchMessagingDUnitTest.java