HttpClientRequest req = client.request(HttpMethod.GET, DEFAULT_HTTP_PORT, DEFAULT_HTTP_HOST, DEFAULT_TEST_URI, resp -> {
fail("End should not be called because the request should fail to connect");
});
req.exceptionHandler(exception::set);
req.setTimeout(800);
req.end();
vertx.setTimer(1500, id -> {
assertNotNull("Expected an exception to be set", exception.get());
assertFalse("Expected to not end with timeout exception, but did: " + exception.get(), exception.get() instanceof TimeoutException);
testComplete();