private static short getMessageInfoAndMetadataListSerDeVersion(short replicaMetadataResponseVersion) {
    switch (replicaMetadataResponseVersion) {
      case ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_1:
        return MessageInfoAndMetadataListSerde.VERSION_1;
      case ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_2:
        return MessageInfoAndMetadataListSerde.VERSION_2;
      case ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_3:
        return MessageInfoAndMetadataListSerde.VERSION_3;
      case ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_4:
        return MessageInfoAndMetadataListSerde.VERSION_4;
      case ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_5:
      case ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_6:
        return MessageInfoAndMetadataListSerde.DETERMINE_VERSION;
      default:
        throw new IllegalArgumentException(
            "Unknown ReplicaMetadataResponse version encountered: " + replicaMetadataResponseVersion);
    }
  }
Return the MessageInfoAndMetadataList SerDe version to use for the given {@link ReplicaMetadataResponse} version
@param replicaMetadataResponseVersion the {@link ReplicaMetadataResponse} version
@return the MessageInfoAndMetadataList SerDe version to use for the given {@link ReplicaMetadataResponse} version
ambry-protocol/src/main/java/com/github/ambry/protocol/ReplicaMetadataResponseInfo.java