params.put("empty_param", "");
params.put("null_param", null);
params.put("", "some_value");
params.put(null, "some_value");
OAuthResponse res = OAuthResponse.status(200).location("").buildQueryMessage();
OAuthParametersApplier applier = new WWWAuthHeaderParametersApplier();
res = (OAuthResponse)applier.applyOAuthParameters(res, params);
Assert.assertNotNull(res);
String header = res.getHeader(OAuth.HeaderType.WWW_AUTHENTICATE);
Assert.assertNotNull(header);
Assert.assertEquals(OAuth.OAUTH_HEADER_NAME
+ " scope=\"s1 s2 s3\",error_uri=\"http://www.example.com/error\",error=\"invalid_token\"",
header);