Example #1
0
  @Test
  public void testCreateSignedHeaders() {
    Map<String, String> headers = new HashMap<String, String>();
    headers.put("Content-Type", " application/json ");
    headers.put("Host", "http://localhost");

    String result = SignUtil.createSignedHeaders(headers);
    assertThat(result, is("content-type;host"));
  }
Example #2
0
 @Test
 public void testCreateSignedHeaders_withEmptyMap() {
   assertThat(SignUtil.createSignedHeaders(null), is(""));
   assertThat(SignUtil.createSignedHeaders(new HashMap<String, String>()), is(""));
 }