@Test
  public void testWrongPortConnection() throws Exception {
    BlockingChannel channel =
        new SSLBlockingChannel(hostName, sslPort + 1, new MetricRegistry(), 10000, 10000, 10000, 2000, sslSocketFactory,
            clientSSLConfig);
    try {
      // send request
      channel.connect();
      fail("should have thrown!");
    } catch (IOException e) {
    }
  }
Run only once for all tests
ambry-network/src/test/java/com/github/ambry/network/SSLBlockingChannelTest.java