class MessageList implements Serializable, Iterable<Message> {

    public Optional<Severity> getSeverity() {
        return messages.stream()
                .map(Message::getSeverity)
                .max(Comparator.comparing(Severity::ordinal));
    }

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

}