final ContextAwareAuthScheme authScheme2 = Mockito.mock(ContextAwareAuthScheme.class);
Mockito.when(authScheme2.authenticate(
Mockito.any(Credentials.class),
Mockito.any(HttpRequest.class),
Mockito.any(HttpContext.class))).thenReturn(new BasicHeader(AUTH.WWW_AUTH_RESP, "stuff"));
authOptions.add(new AuthOption(authScheme1, this.credentials));
authOptions.add(new AuthOption(authScheme2, this.credentials));
this.authState.update(authOptions);
this.httpAuthenticator.generateAuthResponse(request, authState, context);
Assert.assertSame(authScheme2, this.authState.getAuthScheme());