  @Test
  public void testMerge() {

    List<byte[]> list = Arrays.asList(b1, b2);
    Iterator<byte[]> it = list.iterator();

    List<byte[]> list2 = Arrays.asList(b3, b4);
    Iterator<byte[]> it2 = list2.iterator();

    byte[] a1 = example.aggregate(new HashMap<>(), it);
    byte[] a2 = example.aggregate(new HashMap<>(), it2);

    Iterator<byte[]> mergedIt = Arrays.asList(a1, a2).iterator();

    byte[] mergedByteArray = example.merge(new HashMap<>(), mergedIt);

    List<DataMessage> mergedMessageList = ExampleReader.readMessages(mergedByteArray);

    assertEquals(m1, mergedMessageList.get(0));
    assertEquals(m2, mergedMessageList.get(1));
    assertEquals(m3, mergedMessageList.get(2));
    assertEquals(m4, mergedMessageList.get(3));
  }