@Test public void testEquals() { new EqualsTester() .addEqualityGroup(subject1, sameAsSubject1) .addEqualityGroup(subject2) .addEqualityGroup(subject3) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } MessageSubject that = (MessageSubject) obj; return Objects.equals(this.value, that.value); }
MessageSubject { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } MessageSubject that = (MessageSubject) obj; return Objects.equals(this.value, that.value); } }
MessageSubject { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } MessageSubject that = (MessageSubject) obj; return Objects.equals(this.value, that.value); } MessageSubject(String value); protected  MessageSubject(); }
MessageSubject { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } MessageSubject that = (MessageSubject) obj; return Objects.equals(this.value, that.value); } MessageSubject(String value); protected  MessageSubject(); String value(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
MessageSubject { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } MessageSubject that = (MessageSubject) obj; return Objects.equals(this.value, that.value); } MessageSubject(String value); protected  MessageSubject(); String value(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }