anchor.diff:           , {{T1, 1}, [{<<>>, <<>>}, {<<>>, <<?i16(3)>>}]}
            , {{T2, 0}, [{<<>>, <<"foobar">>}]}
            , {{T3, 0}, []}],
  -  %% metadata: 16b acks, 32b timeout, 32b topics count, topics
  -  %% topic: 16b name size, name, 32b partitions count, partitions
  -  %% partition: 32b id, 32b msg set size, msg set
  -  %% message set: [message]
  -  %% message: 64b offset, 32b message size, CRC32,
  -  %%          8b magic byte, 8b compress mode,
  -  %%          32b key size, key, 32b value size, value
     R2 = #produce_request{acks = 0, timeout = 10, data = Data},
     Crc1 = erlang:crc32(<<?i8(?MAGIC_BYTE), ?i8(?COMPRESS_NONE),
                           ?i32s(-1), ?i32s(-1)>>),
  
positive.code:   mk_test_partition_bin(Id, 0, 0, [], []).
  
  mk_test_partition_bin(Id, ErrorCode, LeaderId, Replicas, Isrs) ->
    F = fun(I) -> <<I:32/integer>> end,
    <<ErrorCode:16/signed-integer,
      Id:32/integer,
      LeaderId:32/signed-integer,
      (mk_array(Replicas, F))/binary,
      (mk_array(Isrs, F))/binary>>.
  
  
negative.code:                         ?i32s(-1), ?i32s(2), ?i16(3)>>),
    Crc5 = erlang:crc32(<<?i8(?MAGIC_BYTE), ?i8(?COMPRESS_NONE),
                          ?i32s(-1), ?i32s(6), "foobar">>),
    %% metadata: 16b acks, 32b timeout, 32b topics count, topics
    %% topic: 16b name size, name, 32b partitions count, partitions
    %% partition: 32b id, 32b msg set size, msg set
    %% message set: [message]
    %% message: 64b offset, 32b message size, CRC32,
    %%          8b magic byte, 8b compress mode,
    %%          32b key size, key, 32b value size, value
    ?assertEqual(<<?i16s(0), ?i32(10), ?i32(3),    % metadata
                   ?i16(2), T1/binary, ?i32(3),    % t1 start
                   ?i32(0), ?i32(0),               % p0 start/end
  