示例#1
0
 @Test
 public void testCreateBodyHash_withNull() {
   assertThat(
       "if body is empty, use the empty string",
       SignUtil.createBodyHash(null),
       is("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"));
 }
示例#2
0
 @Test
 public void testCreateBodyHash() {
   Map<String, Object> body = new LinkedHashMap<String, Object>();
   body.put("a", "b");
   body.put("c", "d");
   assertThat(
       SignUtil.createBodyHash(body),
       is("b85c7da93e8790518898c280e15e3f1af5d46bf4aaa4407690f0f0a3b0316478"));
 }