private static HelloService.Iface newSchemeCapturingClient(
            String uri, AtomicReference<SessionProtocol> sessionProtocol) {

        return ThriftClients.builder(uri)
                            .rpcDecorator((delegate, ctx, req) -> {
                                ctx.log().whenAvailable(RequestLogProperty.SESSION)
                                   .thenAccept(log -> sessionProtocol.set(log.sessionProtocol()));
                                return delegate.execute(ctx, req);
                            })
                            .build(HelloService.Iface.class);
    }
{@link SessionProtocolNegotiationException} should be raised if a user specified H2C explicitly and the
client failed to upgrade.
thrift/thrift0.13/src/test/java/com/linecorp/armeria/client/thrift/ThriftOverHttpClientTServletIntegrationTest.java