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