@Test
  public void testInvalidMetadataContentV2Fields() {
    List<StoreKey> keys = getKeys(60, 5);
    int[] chunkSizes = {0, 5, 10, 10};
    long[] totalSizes = {5, -10, 10 * keys.size() - 10, 10 * keys.size() + 1};
    for (int n = 0; n < chunkSizes.length; n++) {
      try {
        MetadataContentSerDe.serializeMetadataContentV2(chunkSizes[n], totalSizes[n], keys);
        fail("Should have failed to serialize");
      } catch (IllegalArgumentException ignored) {
      }
    }
  }
Tests UpdateRecord V3 for serialization and deserialization
@throws IOException
@throws MessageFormatException
ambry-messageformat/src/test/java/com/github/ambry/messageformat/MessageFormatRecordTest.java