private void createAndReleaseSingleChannelTest(Properties props, String host, Port port)
      throws InterruptedException, ConnectionPoolTimeoutException {
    BlockingChannelInfo channelInfo =
        new BlockingChannelInfo(new ConnectionPoolConfig(new VerifiableProperties(props)), host, port,
            new MetricRegistry(), sslSocketFactory, sslConfig);
    Assert.assertEquals(channelInfo.getNumberOfConnections(), 0);
    BlockingChannel blockingChannel = channelInfo.getBlockingChannel(1000);
    Assert.assertEquals(channelInfo.getNumberOfConnections(), 1);
    channelInfo.releaseBlockingChannel(blockingChannel);
    Assert.assertEquals(channelInfo.getNumberOfConnections(), 1);
  }
Tests how connection failures are handled by BlockingChannelInfo.
ambry-network/src/test/java/com/github/ambry/network/BlockingChannelConnectionPoolTest.java