static <T> MessageStream<T> mergeAll(Collection<? extends MessageStream<? extends T>> streams) {
    if (streams.isEmpty()) {
      throw new IllegalArgumentException("No streams to merge.");
    }
    ArrayList<MessageStream<T>> messageStreams = new ArrayList<>((Collection<MessageStream<T>>) streams);
    MessageStream<T> firstStream = messageStreams.remove(0);
    return firstStream.merge(messageStreams);
  }
Merges all {@code streams}.
<p>
The merged {@link MessageStream} contains messages from all {@code streams} in the order they arrive.

@param streams {@link MessageStream}s to be merged
@param <T> the type of messages in each of the streams
@return the merged {@link MessageStream}
@throws IllegalArgumentException if {@code streams} is empty
samza-api/src/main/java/org/apache/samza/operators/MessageStream.java