List<Map.Entry<String, String>> parameters =
new ArrayList<Map.Entry<String, String>>();
parameters.add(new OAuth.Parameter(OAuth.OAUTH_NONCE, "987654321"));
parameters.add(new OAuth.Parameter(OAuth.OAUTH_TIMESTAMP, "123456789"));
HttpMessage message = authScheme.getHttpMessage(provider, "POST", url,
headers, "{a:\"test\"}".getBytes("UTF-8"), parameters);
assertEquals("http://example.org/test?arg=value" +
"&oauth_nonce=987654321&oauth_timestamp=123456789" +
"&oauth_body_hash=PkyA2Pf44ldLEq%2BZYMo7g6uH3UE%3D&" +
"oauth_token=ACCESS_TOKEN&oauth_consumer_key=consumerKey&" +
"oauth_signature_method=HMAC-SHA1&oauth_version=1.0&" +
"oauth_signature=zdRixuj4wcLHvY6%2BT8u6%2FWGNuZI%3D",
message.url.toString());
assertEquals("{a:\"test\"}", new BufferedReader(
new InputStreamReader(message.getBody())).readLine());
}