LongTypedProperty extends TypedProperty { public void setValue(long value) { this.value = value; }  @Override String getType(); long getValue(); void setValue(long value); @Override void read(JSONObject object); @Override void write(JSONStringer writer); @Override boolean equals(Object o); @Override int hashCode(); static final String TYPE; }
@Test public void equalsHashCode() { LongTypedProperty a = new LongTypedProperty(); LongTypedProperty b = new LongTypedProperty(); checkNotEquals(a, null); checkNotEquals(null, a); checkNotEquals(a, new Object()); checkEquals(a, a); checkEquals(a, b); a.setName("name"); checkNotEquals(a, b); b.setName("name"); checkEquals(a, b); a.setValue(100); checkNotEquals(a, b); b.setValue(100); checkEquals(a, b); }