@Test
public void testCanonicalRepresentation_Client_AllFields_Post() throws Exception {

  MessageBodyWriter<String> messageBodyWriter = new StringProvider();
  // Mock Providers
  Providers providers = mock(Providers.class);
  when(providers.getMessageBodyWriter(String.class, String.class,
    new Annotation[0], MediaType.APPLICATION_JSON_TYPE)).thenReturn(messageBodyWriter);
  OutBoundHeaders headers = new OutBoundHeaders();
  headers.add(HttpHeaders.DATE, "Sat, 01 Jan 2000 12:34:56 GMT");
  headers.add(HttpHeaders.HOST, "www.example.org");
  headers.add(HttpHeaders.USER_AGENT, "curl/7.20.0 (x86_64-pc-linux-gnu) libcurl/7.20.0 OpenSSL/1.0.0a zlib/1.2.3");
  headers.add(HmacUtils.X_HMAC_DATE, "Sat, 01 Jan 2000 12:34:57 GMT");
  headers.add(HmacUtils.X_HMAC_NONCE, "Thohn2Mohd2zugo");
  URI uri = new URI(baseUri + resourcePath + queryParameters);
  String entity = "{\"_links\":{\"self\":{\"href\":\"http://example.org/user\"}}}";
  ClientRequest clientRequest = new ClientRequestImpl(uri, "post", entity, headers);
  String representation = HmacUtils.createCanonicalRepresentation(clientRequest, providers);
  FixtureAsserts.assertStringMatchesStringFixture("POST canonical representation", representation, "/fixtures/hmac/expected-canonical-post.txt");
}