private static void assertJsonObjectEquals(String expected,String actual){
  ObjectMapper mapper=new ObjectMapper();
  TypeReference<Map<String,Object>> ref=new TypeReference<Map<String,Object>>(){
  }
;
  try {
    Map<String,Object> em=mapper.readValue(expected,ref);
    Map<String,Object> am=mapper.readValue(actual,ref);
    assertEquals(em,am);
  }
 catch (  IOException e) {
    throw new IllegalStateException(e);
  }
}

private static void assertJsonObjectEquals ( String expected , String actual ) { ObjectMapper mapper = new ObjectMapper ( ) ; TypeReference < Map < String , Object > > ref = new TypeReference < Map < String , Object > > ( ) { } ; try { Map < String , Object > em = mapper . readValue ( expected , ref ) ; Map < String , Object > am = mapper . readValue ( actual , ref ) ; assertEquals ( em , am ) ; } catch ( IOException e ) { throw new IllegalStateException ( e ) ; } }
assert that two json objects are equal
