server.listen(onSuccess(s -> {
client.request(HttpMethod.CONNECT, DEFAULT_HTTP_PORT, DEFAULT_HTTP_HOST, DEFAULT_TEST_URI, resp -> {
assertEquals(200, resp.statusCode());
NetSocket socket = resp.netSocket();
socket.handler(buff -> {
received.appendBuffer(buff);
if (received.length() == buffer.length()) {
netServer.close();
assertEquals(buffer, received);
testComplete();
}