testRandomlyChunkedFuzzyMessages() {
    const fuzzing = new JsonFuzzing();

    const data = fuzzing.newArray();
    const dataString = googJson.serialize(data);

    const parser = new JsonStreamParser();

    let result = [];

    print(dataString);

    // randomly generated chunks
    let pos = 0;
    while (pos < dataString.length) {
      const num = fuzzing.nextInt(1, dataString.length - pos);
      const next = pos + num;
      const subString = dataString.substring(pos, next);

      print(subString);

      pos = next;
      const parsed = parser.parse(subString);
      if (parsed) {
        result = result.concat(parsed);
      }
    }

    assertEquals(data.length, result.length);
    data.forEach((elm, index) => {
      assertObjectEquals(
          `${dataString}
@${index}`,
          elm, result[index]);
    });
  }
Parse a fuzzy json string in randomly generated chunks.