LocExtension implements Model { public void setTz(String tz) { this.tz = tz; }  String getTz(); void setTz(String tz); @Override void read(JSONObject object); @Override void write(JSONStringer writer); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void equalsHashCode() { LocExtension a = new LocExtension(); LocExtension b = new LocExtension(); checkEquals(a, b); a.setTz("a1"); checkNotEquals(a, b); b.setTz("b1"); checkNotEquals(a, b); b.setTz("a1"); checkEquals(a, b); }