this.credentialsProvider.setCredentials(AuthScope.ANY, this.credentials);
this.context.setAttribute(ClientContext.CREDS_PROVIDER, this.credentialsProvider);
this.authSchemeRegistry = RegistryBuilder.<AuthSchemeProvider>create()
.register("basic", new BasicSchemeFactory())
.register("digest", new DigestSchemeFactory())
.register("ntlm", new NTLMSchemeFactory()).build();
this.context.setAttribute(ClientContext.AUTHSCHEME_REGISTRY, this.authSchemeRegistry);
this.authCache = Mockito.mock(AuthCache.class);
this.context.setAttribute(ClientContext.AUTH_CACHE, this.authCache);
this.httpAuthenticator = new HttpAuthenticator();
}