@Test
  public void testWarmUpConnectionFailureHandling() throws Exception {
    try {
      Properties props = getNonBlockingRouterProperties("DC3");
      MockServerLayout mockServerLayout = new MockServerLayout(mockClusterMap);
      mockSelectorState.set(MockSelectorState.FailConnectionInitiationOnPoll);
      setRouter(props, mockServerLayout, new LoggingNotificationSystem());
      for (DataNodeId node : mockClusterMap.getDataNodes()) {
        assertTrue("Node should be marked as timed out by ResponseHandler.", ((MockDataNodeId) node).isTimedOut());
      }
    } finally {
      if (router != null) {
        router.close();
      }
      mockSelectorState.set(MockSelectorState.Good);
    }
  }
Test that Response Handler correctly handles disconnected connections after warming up.
ambry-router/src/test/java/com/github/ambry/router/NonBlockingRouterTest.java