@Test
    public void testCallbackInHttpClient() throws Exception {
        final TransmittableThreadLocal<String> transmittableThreadLocal = new TransmittableThreadLocal<>();
        final InheritableThreadLocal<String> inheritableThreadLocal = new InheritableThreadLocal<>();
        final String transmittedData = "transmitted_data_ttl";
        final String inheritedData = "inherited_data_ttl";

        final Vertx vertx = Vertx.vertx();

        //set value after eventLoop thread was created
        transmittableThreadLocal.set(transmittedData);
        inheritableThreadLocal.set(inheritedData);

        vertx.createHttpClient().get(80, "bing.com", "/", event -> {
            System.out.println("receive msg:" + event.statusCode());
            System.out.println("===================callback=====================");
            event.bodyHandler(body -> {
                System.out.println("receive response body: " + body.toString(UTF_8));
            });

            if (TtlAgent.isTtlAgentLoaded()) {
                System.out.println("Test **WITH** TTL Agent");
                assertEquals(transmittedData, transmittableThreadLocal.get());
                assertNull(inheritableThreadLocal.get());
            } else {
                System.out.println("Test WITHOUT TTL Agent");
                assertNull(transmittableThreadLocal.get());
                assertNull(inheritableThreadLocal.get());
            }

            System.out.println("===================callback=====================");
        }).end();

        //wait for callback
        Thread.sleep(2000);
    }
@author tk (soulmate.tangk at gmail dot com)
ttl-integrations/vertx3-ttl-integration/src/test/java/com/alibaba/ttl/integration/vertx3/VertxTransformletTest.java