JsonPatchItem { @Override public boolean equals(Object o) { if (this == o) {return true;} if (o == null || getClass() != o.getClass()) {return false;} JsonPatchItem that = (JsonPatchItem) o; return op == that.op && Objects.equals(path, that.path) && Objects.equals(toString(), that.toString()); } JsonPatchItem(JsonPatchOperation op, String path, Object value);  JsonPatchItem(JsonPatchOperation op, String path);  JsonPatchItem(JSONObject row); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); JsonPatchOperation getOp(); String getPath(); Object getValue();  }
@Test public void edgeEquals() { JsonPatchItem i = new JsonPatchItem(add, "/foo", "bar"); assertTrue(i.equals(i)); assertFalse(i.equals(null)); assertFalse(i.equals(new Object())); }