@Test
  public void testRedundancySpecifiedEPFails() throws Exception {

    createClientCache(NetworkUtils.getServerHostName(), PORT1, PORT2, PORT3, PORT4,
        2);
    waitConnectedServers(4);
    assertThat(pool.getRedundantNames().size()).isEqualTo(2);
    assertThat(pool.getPrimaryName().equals(SERVER1)).isTrue();
    assertThat(pool.getRedundantNames().contains(SERVER2)).isTrue();
    assertThat(pool.getRedundantNames().contains(SERVER3)).isTrue();
    assertThat(pool.getRedundantNames().contains(SERVER4)).isFalse();
    // kill non primary EPs
    verifyOrderOfEndpoints();
    server1.invoke(RedundancyLevelTestBase::stopServer);
    server2.invoke(RedundancyLevelTestBase::stopServer);
    verifyConnectedAndRedundantServers(2, 1);
    verifyOrderOfEndpoints();
    server1.invoke(RedundancyLevelTestBase::startServer);
    verifyConnectedAndRedundantServers(3, 2);
    verifyOrderOfEndpoints();
    assertThat(pool.getPrimaryName().equals(SERVER1)).isTrue();
    verifyRedundantServersContain(SERVER2);
    verifyRedundantServersContain(SERVER4);
    server1.invoke(RedundancyLevelTestBase::verifyInterestRegistration);
    // bring up another server should get added to live server map only and
    // not to the active server as redundancy level is satisfied.
    server2.invoke(RedundancyLevelTestBase::startServer);
    Wait.pause(1000);
    verifyOrderOfEndpoints();
    server2.invoke(RedundancyLevelTestBase::verifyNoCCP);

  }
There are 4 Eps in Live server Map with redundancy level as 2. Kill two Eps (excluding the
primary). As a result live server map will contain 2 , active list will contain two & dead
server map will contain 2. Redundancy is unsatisfied by 1. Bring up one EP . The DSM should add
the alive EP to the active end point & live server map with primary unchanged. Also make sure
that CCP is created on the server with relevant interest registration. Bringing the 4th EP
alive should simply add it to Live server map.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java