context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, this.target);
context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
context.setAttribute(ClientContext.COOKIE_STORE, this.cookieStore);
context.setAttribute(ClientContext.COOKIESPEC_REGISTRY, this.cookieSpecRegistry);
HttpRequestInterceptor interceptor = new RequestAddCookies();
interceptor.process(request, context);
Header[] headers1 = request.getHeaders(SM.COOKIE);
Assert.assertNotNull(headers1);
Assert.assertEquals(2, headers1.length);
Assert.assertEquals("$Version=1; name1=\"value1\"", headers1[0].getValue());