@Test public void notEqualsWithEventCode() { Event event1 = new Event(new UINT16(0), SESSION_ID, TRANSACTION_ID, P1, P2, P3); Event event2 = new Event(new UINT16(1), SESSION_ID, TRANSACTION_ID, P1, P2, P3); assertFalse(event1.equals(event2)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Event rhs = (Event) o; return new EqualsBuilder() .append(eventCode, rhs.eventCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .isEquals(); }
Event { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Event rhs = (Event) o; return new EqualsBuilder() .append(eventCode, rhs.eventCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .isEquals(); } }
Event { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Event rhs = (Event) o; return new EqualsBuilder() .append(eventCode, rhs.eventCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .isEquals(); } Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID);  Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1);  Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2);  Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3); }
Event { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Event rhs = (Event) o; return new EqualsBuilder() .append(eventCode, rhs.eventCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .isEquals(); } Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID);  Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1);  Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2);  Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3); UINT16 getEventCode(); UINT32 getSessionID(); UINT32 getTransactionID(); UINT32 getP1(); UINT32 getP2(); UINT32 getP3(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
Event { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Event rhs = (Event) o; return new EqualsBuilder() .append(eventCode, rhs.eventCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .isEquals(); } Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID);  Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1);  Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2);  Event(UINT16 eventCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3); UINT16 getEventCode(); UINT32 getSessionID(); UINT32 getTransactionID(); UINT32 getP1(); UINT32 getP2(); UINT32 getP3(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }