@Test public void with_nothing_set_equals() { assertTrue(data1.equals(data2)); assertTrue(data2.equals(data1)); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FalsePositiveJobData other = (FalsePositiveJobData) obj; return findingId == other.findingId && Objects.equals(jobUUID, other.jobUUID); }
FalsePositiveJobData { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FalsePositiveJobData other = (FalsePositiveJobData) obj; return findingId == other.findingId && Objects.equals(jobUUID, other.jobUUID); } }
FalsePositiveJobData { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FalsePositiveJobData other = (FalsePositiveJobData) obj; return findingId == other.findingId && Objects.equals(jobUUID, other.jobUUID); }  }
FalsePositiveJobData { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FalsePositiveJobData other = (FalsePositiveJobData) obj; return findingId == other.findingId && Objects.equals(jobUUID, other.jobUUID); }  UUID getJobUUID(); void setJobUUID(UUID jobUUID); int getFindingId(); void setFindingId(int id); void setComment(String comment); String getComment(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
FalsePositiveJobData { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FalsePositiveJobData other = (FalsePositiveJobData) obj; return findingId == other.findingId && Objects.equals(jobUUID, other.jobUUID); }  UUID getJobUUID(); void setJobUUID(UUID jobUUID); int getFindingId(); void setFindingId(int id); void setComment(String comment); String getComment(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static final String PROPERTY_JOBUUID; static final String PROPERTY_FINDINGID; static final String PROPERTY_COMMENT; }