@Test public void notEqualsWithP1() { Response response1 = new Response(RESPONSE_CODE, SESSION_ID, TRANSACTION_ID, new UINT32(0), P2, P3, P4, P5); Response response2 = new Response(RESPONSE_CODE, SESSION_ID, TRANSACTION_ID, new UINT32(1), P2, P3, P4, P5); assertFalse(response1.equals(response2)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Response rhs = (Response) o; return new EqualsBuilder() .append(responseCode, rhs.responseCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .append(p4, rhs.p4) .append(p5, rhs.p5) .isEquals(); }
Response { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Response rhs = (Response) o; return new EqualsBuilder() .append(responseCode, rhs.responseCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .append(p4, rhs.p4) .append(p5, rhs.p5) .isEquals(); } }
Response { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Response rhs = (Response) o; return new EqualsBuilder() .append(responseCode, rhs.responseCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .append(p4, rhs.p4) .append(p5, rhs.p5) .isEquals(); } Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4, UINT32 p5); }
Response { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Response rhs = (Response) o; return new EqualsBuilder() .append(responseCode, rhs.responseCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .append(p4, rhs.p4) .append(p5, rhs.p5) .isEquals(); } Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4, UINT32 p5); UINT16 getResponseCode(); UINT32 getSessionID(); UINT32 getTransactionID(); UINT32 getP1(); UINT32 getP2(); UINT32 getP3(); UINT32 getP4(); UINT32 getP5(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
Response { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Response rhs = (Response) o; return new EqualsBuilder() .append(responseCode, rhs.responseCode) .append(sessionID, rhs.sessionID) .append(transactionID, rhs.transactionID) .append(p1, rhs.p1) .append(p2, rhs.p2) .append(p3, rhs.p3) .append(p4, rhs.p4) .append(p5, rhs.p5) .isEquals(); } Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);  Response(UINT16 responseCode, UINT32 sessionID, UINT32 transactionID, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4, UINT32 p5); UINT16 getResponseCode(); UINT32 getSessionID(); UINT32 getTransactionID(); UINT32 getP1(); UINT32 getP2(); UINT32 getP3(); UINT32 getP4(); UINT32 getP5(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }