private boolean areIdenticalPutRequests(byte[] p, byte[] q) {
    if (p == q) {
      return true;
    }
    if (p.length != q.length) {
      return false;
    }
    // correlation ids will be different. Zero it out before comparing.
    // correlation id is an int that comes after size (Long), request type (Short) and version (Short)
    ByteBuffer pWrap = ByteBuffer.wrap(p);
    ByteBuffer qWrap = ByteBuffer.wrap(q);
    int offsetOfCorrelationId = 8 + 2 + 2;
    pWrap.putInt(offsetOfCorrelationId, 0);
    qWrap.putInt(offsetOfCorrelationId, 0);
    return Arrays.equals(p, q);
  }
Returns true if the two {@link PutRequest}s are identical. The comparison involves resetting the correlation
ids (as they will always be different for two different requests), so the check is not for strict identity.
@param p byte array containing one of the {@link PutRequest}.
@param q byte array containing the other {@link PutRequest}.
@return true if they are equal.
ambry-router/src/test/java/com/github/ambry/router/PutManagerTest.java