private static List<AggregatedBodyPart> parse(String boundary, List<byte[]> data) {
        final ByteBufsDecoderInput input = new ByteBufsDecoderInput(ByteBufAllocator.DEFAULT);
        final List<BodyPart> output = new ArrayList<>();
        final MimeParser parser = new MimeParser(input, output::add, boundary,
                                                 // Use onBodyPartBegin and requestUpstreamForBodyPartData
                                                 new MultipartDecoder(StreamMessage.of(), "boundary",
                                                                      ByteBufAllocator.DEFAULT));
        for (byte[] bytes : data) {
            input.add(Unpooled.wrappedBuffer(bytes));
            parser.parse();
        }
        parser.close();
        return output.stream()
                     .map(part -> {
                         final HttpData content = Flux.from(part.content())
                                                      .map(HttpData::array)
                                                      .reduce(Bytes::concat)
                                                      .map(HttpData::wrap)
                                                      .block();
                         return AggregatedBodyPart.of(part.headers(), content);
                     }).collect(toImmutableList());
    }
Parse the parts in the given chunks.

@param boundary boundary string
@param data for the chunks to parse
@return test parser event processor
core/src/test/java/com/linecorp/armeria/common/multipart/MimeParserTest.java