### Question:
ReqId { @Override public boolean equals(Object obj) { try { return eq((ReqId) obj); } catch (ClassCastException ex) { return false; } } ReqId(int clientId, int generation, int partitionId, int seqNum);  ReqId(long mostSigBits, long leastSigBits); int clientId(); int generation(); int partitionId(); int seqNum(); int hashCode(); boolean eq(ReqId other); @Override boolean equals(Object obj); static ReqId readFrom(MessageAttributeReader reader); void writeTo(MessageAttributeWriter writer); static ReqId readFrom(byte[] buf, int offset); void writeTo(byte[] buf, int offset); @Override String toString(); final long mostSigBits; final long leastSigBits; }### Answer:
@Test public void testEquals() { assertTrue(new ReqId(clientId, generation, partitionId, seqNum).equals(new ReqId(clientId, generation, partitionId, seqNum))); assertFalse(new ReqId(clientId, generation, partitionId, seqNum).equals(null)); assertFalse(new ReqId(clientId, generation, partitionId, seqNum).equals(new Object())); }