package com.yahoo.vespa.hosted.controller.api.integration.organization;

import com.google.common.collect.ImmutableList;

import java.util.List;
import java.util.Objects;

/**
 * A message with a sender and a set of recipients.
 *
 * @author jonmv
 */
public class Mail {

    private final List<String> recipients;
    private final String message;

    public Mail(List<String> recipients, String message) {
        recipients.forEach(Objects::requireNonNull);
        this.recipients = ImmutableList.copyOf(recipients);
        this.message = Objects.requireNonNull(message);
    }

    public List<String> recipients() { return recipients; }
    public String message() { return message; }

}

@@ -309,16 +309,50 @@
 pients;%0A
+    private final String subject;%0A
     priv
@@ -430,18 +430,156 @@
 ing 
-message) %7B
+subject, String message) %7B%0A        if (recipients.isEmpty())%0A            throw new IllegalArgumentException(%22Empty recipient list is not allowed.%22);
 %0A   
@@ -688,16 +688,72 @@
 ients);%0A
+        this.subject = Objects.requireNonNull(subject);%0A
         
@@ -867,16 +867,64 @@
 ents; %7D%0A
+    public String subject() %7B return subject; %7D%0A
     publ

Add subject, require recipient