@Test
  public void testServerDisconnect() throws Exception {
    // connect and do a simple request
    String connectionId = blockingConnect();
    assertEquals("hello", blockingRequest(connectionId, "hello"));

    // disconnect
    this.server.closeConnections();
    while (!selector.disconnected().contains(connectionId)) {
      selector.poll(1000L);
    }

    // reconnect and do another request
    connectionId = blockingConnect();
    assertEquals("hello", blockingRequest(connectionId, "hello"));
  }
Validate that when the server disconnects, a client send ends up with that node in the disconnected list.
ambry-network/src/test/java/com/github/ambry/network/SelectorTest.java