Mockito.when(this.authScheme.isComplete()).thenReturn(Boolean.TRUE);
this.context = new BasicHttpContext();
this.host = new HttpHost("localhost", 80);
this.context.setAttribute(HttpCoreContext.HTTP_TARGET_HOST, this.host);
this.credentials = Mockito.mock(Credentials.class);
this.credentialsProvider = new BasicCredentialsProvider();
this.credentialsProvider.setCredentials(AuthScope.ANY, this.credentials);
this.context.setAttribute(HttpClientContext.CREDS_PROVIDER, this.credentialsProvider);
this.authSchemeRegistry = RegistryBuilder.<AuthSchemeProvider>create()
.register("basic", new BasicSchemeFactory())
.register("digest", new DigestSchemeFactory())