@Test
  public void replicaMetadataRequestTest() throws IOException {
    short oldMessageInfoVersion = MessageInfoAndMetadataListSerde.AUTO_VERSION;
    for (ReplicaType replicaType : ReplicaType.values()) {
      doReplicaMetadataRequestTest(ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_6,
          ReplicaMetadataRequest.Replica_Metadata_Request_Version_V2, MessageInfoAndMetadataListSerde.VERSION_5,
          replicaType);
      doReplicaMetadataRequestTest(ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_6,
          ReplicaMetadataRequest.Replica_Metadata_Request_Version_V2, MessageInfoAndMetadataListSerde.VERSION_6,
          replicaType);
      doReplicaMetadataRequestTest(ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_4,
          ReplicaMetadataRequest.Replica_Metadata_Request_Version_V1, MessageInfoAndMetadataListSerde.VERSION_5,
          replicaType);
      doReplicaMetadataRequestTest(ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_5,
          ReplicaMetadataRequest.Replica_Metadata_Request_Version_V1, MessageInfoAndMetadataListSerde.VERSION_5,
          replicaType);
      doReplicaMetadataRequestTest(ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_5,
          ReplicaMetadataRequest.Replica_Metadata_Request_Version_V1, MessageInfoAndMetadataListSerde.VERSION_6,
          replicaType);
    }
    MessageInfoAndMetadataListSerde.AUTO_VERSION = oldMessageInfoVersion;
  }
Test for undelete request and response.
@throws IOException
ambry-protocol/src/test/java/com/github/ambry/protocol/RequestResponseTest.java