Пример #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"));
  }
Пример #2
0
 @Test
 public void testCreateSignedHeaders_withEmptyMap() {
   assertThat(SignUtil.createSignedHeaders(null), is(""));
   assertThat(SignUtil.createSignedHeaders(new HashMap<String, String>()), is(""));
 }