class MessageList implements Serializable, Iterable<Message> {

    public MessageList sortBySeverity() {
        return messages.stream()
                .sorted(Comparator.comparing(Message::getSeverity).reversed())
                .collect(collector());
    }

    public  MessageList(@NonNull Message... messages);

}