Header authChallenge = new BasicHeader(AUTH.WWW_AUTH, challenge);
HttpRequest request = new BasicHttpRequest("Simple", "/?param=value");
Credentials cred = new UsernamePasswordCredentials("username","password");
AuthScheme authscheme = new DigestScheme();
authscheme.processChallenge(authChallenge);
Header authResponse = authscheme.authenticate(cred, request);
Map<String, String> table = parseAuthResponse(authResponse);
assertEquals("username", table.get("username"));
assertEquals("realm1", table.get("realm"));
assertEquals("/?param=value", table.get("uri"));