@Test
    void testConnectTimeoutExceptionFromCauseHostAndRemoteAddress() throws Exception {
        final HttpHost target = new HttpHost("localhost");
        final InetAddress remoteAddress = InetAddress.getByAddress(new byte[] {1,2,3,4});
        final IOException cause = new IOException();
        final ConnectTimeoutException ctx = ConnectExceptionSupport.createConnectTimeoutException(cause, target, remoteAddress);
        Assertions.assertEquals("Connect to http://localhost [/1.2.3.4] timed out", ctx.getMessage());
    }
Unit tests for exceptions.
Trivial, but it looks better in the Clover reports.
httpclient5/src/test/java/org/apache/hc/client5/http/ConnectExceptionSupportTest.java