@Test
  public void testInvalidMetadataContentV3Fields() {
    List<StoreKey> keys = getKeys(60, 2);
    int[][] chunkSizes = {{0, 0}, {2, 3}, {5, 5}, {5, 5}};
    long[] totalSizes = {5, -10, 10 * keys.size() - 9, 10 * keys.size() + 1};
    for (int n = 0; n < chunkSizes.length; n++) {
      try {
        List<Pair<StoreKey, Long>> keyAndContentSizes = new ArrayList<>();
        keyAndContentSizes.add(new Pair<>(keys.get(0), (long) chunkSizes[n][0]));
        keyAndContentSizes.add(new Pair<>(keys.get(1), (long) chunkSizes[n][1]));
        MetadataContentSerDe.serializeMetadataContentV3(totalSizes[n], keyAndContentSizes);
        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