@Test
  public void getCompatibleResponseVersionTest() {
    Assert.assertEquals(
        "Request version Replica_Metadata_Request_Version_V1 should be compatible with REPLICA_METADATA_RESPONSE_VERSION_V_5",
        ReplicaMetadataResponse.getCompatibleResponseVersion(
            ReplicaMetadataRequest.Replica_Metadata_Request_Version_V1),
        ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_5);
    Assert.assertEquals(
        "Request version Replica_Metadata_Request_Version_V6 should be compatible with REPLICA_METADATA_RESPONSE_VERSION_V_6",
        ReplicaMetadataResponse.getCompatibleResponseVersion(
            ReplicaMetadataRequest.Replica_Metadata_Request_Version_V2),
        ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_6);
    Assert.assertFalse(
        "Request version Replica_Metadata_Request_Version_V1 should not be compatible with REPLICA_METADATA_RESPONSE_VERSION_V_6",
        ReplicaMetadataResponse.getCompatibleResponseVersion(ReplicaMetadataRequest.Replica_Metadata_Request_Version_V1)
            == ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_6);
    Assert.assertFalse(
        "Request version Replica_Metadata_Request_Version_V1 should not be compatible with REPLICA_METADATA_RESPONSE_VERSION_V_6",
        ReplicaMetadataResponse.getCompatibleResponseVersion(ReplicaMetadataRequest.Replica_Metadata_Request_Version_V2)
            == ReplicaMetadataResponse.REPLICA_METADATA_RESPONSE_VERSION_V_5);
  }
ReplicaMetadataRequestResonse compatibility test. Tests {@code ReplicaMetadataResponse#getCompatibleResponseVersion}
ambry-protocol/src/test/java/com/github/ambry/protocol/RequestResponseTest.java