@Test
public void similar() {

    JSONObject obj1 = new JSONObject("{\"foo\":42}");
    JSONObject obj2 = new JSONObject("{\"foo\":42}");
    assertTrue(obj1.similar(obj2));
    obj1.put("foo", -9);
    assertFalse(obj1.similar(obj2));
}