@Override
        public void run() {
            try {
                this.context.setAttribute("user", this.uid);
                for (int r = 0; r < this.requestCount; r++) {
                    final HttpGet httpget = new HttpGet("/");
                    this.httpclient.execute(this.target, httpget, this.context, response -> {
                        EntityUtils.consume(response.getEntity());
                        return null;
                    });
                    this.count++;

                    final EndpointDetails endpointDetails = this.context.getEndpointDetails();
                    final String connuid = Integer.toHexString(System.identityHashCode(endpointDetails));
                    this.context.setAttribute("r" + r, connuid);
                }

            } catch (final Exception ex) {
                this.exception = ex;
            }
        }
Test cases for state-ful connections.
httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestStatefulConnManagement.java