// Path: src/main/java/uk/gov/homeoffice/emailapi/entities/TemplatedEmail.java
// @ApiModel(description = "Enough information to populate and send and email based on a template")
// @JsonDeserialize(as = TemplatedEmailImpl.class)
// @JsonSerialize(as = TemplatedEmailImpl.class)
// public interface TemplatedEmail {
//     @ApiModelProperty(value = "Sender of the email in format \"example@example.org\" or \"Annie Example <annie@example.com>\"", required = true)
//     String getSender();
// 
//     @ApiModelProperty(value = "Subject of the email", required = true)
//     String getSubject();
// 
//     @ApiModelProperty(value = "If a recipient uses HTML to view their they will see this template", required = true)
//     String getHtmlTemplate();
// 
//     @ApiModelProperty(value = "If a recipient uses TXT to view their they will see this template", required = true)
//     String getTextTemplate();
// 
//     @ApiModelProperty(value = "Variables to pass to both templates with string keys, and any JSON Number, String, Array, Object as the value    ", required = true)
//     Map<String, Object> getVariables();
// 
//     @ApiModelProperty(value = "Array of recipients in an array of strings in format \"example@example.org\" or \"Annie Example <annie@example.com>\"", required = true)
//     Collection<String> getRecipients();
// }
// 
// Path: src/main/java/uk/gov/homeoffice/emailapi/templatedemailfactory/TemplatedEmailFactory.java
// public interface TemplatedEmailFactory {
//     Email build(TemplatedEmail templatedEmail)
//         throws EmailException, TemplatePopulatorParsingException, TemplatePopulatorIOException,
//         InternetAddressParsingException;
// }
// 
// Path: src/main/java/uk/gov/homeoffice/emailapi/templatedemailfactory/addressparsing/InternetAddressParsingException.java
// public class InternetAddressParsingException extends Exception {
//     public InternetAddressParsingException(final Throwable cause) {
//         super(cause);
//     }
// }
// 
// Path: src/main/java/uk/gov/homeoffice/emailapi/templatedemailfactory/templating/TemplatePopulatorIOException.java
// public class TemplatePopulatorIOException extends Exception {
//     public TemplatePopulatorIOException(final Throwable cause) {
//         super(cause);
//     }
// }
// 
// Path: src/main/java/uk/gov/homeoffice/emailapi/templatedemailfactory/templating/TemplatePopulatorParsingException.java
// public class TemplatePopulatorParsingException extends Exception {
//     public TemplatePopulatorParsingException(Throwable cause) {
//         super(cause);
//     }
// 
//     public TemplatePopulatorParsingException(String message) {
//         super(message);
//     }
// }


import org.apache.commons.mail.Email;
import org.apache.commons.mail.EmailException;
import org.junit.Test;
import uk.gov.homeoffice.emailapi.entities.TemplatedEmail;
import uk.gov.homeoffice.emailapi.templatedemailfactory.TemplatedEmailFactory;
import uk.gov.homeoffice.emailapi.templatedemailfactory.addressparsing.InternetAddressParsingException;
import uk.gov.homeoffice.emailapi.templatedemailfactory.templating.TemplatePopulatorIOException;
import uk.gov.homeoffice.emailapi.templatedemailfactory.templating.TemplatePopulatorParsingException;
import static org.mockito.Mockito.*;
package uk.gov.homeoffice.emailapi.service;



public class TemplatedEmailSenderImplTest {

    @Test
    public void itGetsATemplatedEmailAndSendsIt()
        throws TemplatePopulatorParsingException, InternetAddressParsingException,
        TemplatePopulatorIOException, EmailException {
        final TemplatedEmail mockTemplatedEmail = mock(TemplatedEmail.class);
        final Email mockEmail = mock(Email.class);
// Path: src/main/java/uk/gov/homeoffice/emailapi/entities/TemplatedEmail.java
// @ApiModel(description = "Enough information to populate and send and email based on a template")
// @JsonDeserialize(as = TemplatedEmailImpl.class)
// @JsonSerialize(as = TemplatedEmailImpl.class)
// public interface TemplatedEmail {
//     @ApiModelProperty(value = "Sender of the email in format \"example@example.org\" or \"Annie Example <annie@example.com>\"", required = true)
//     String getSender();
// 
//     @ApiModelProperty(value = "Subject of the email", required = true)
//     String getSubject();
// 
//     @ApiModelProperty(value = "If a recipient uses HTML to view their they will see this template", required = true)
//     String getHtmlTemplate();
// 
//     @ApiModelProperty(value = "If a recipient uses TXT to view their they will see this template", required = true)
//     String getTextTemplate();
// 
//     @ApiModelProperty(value = "Variables to pass to both templates with string keys, and any JSON Number, String, Array, Object as the value    ", required = true)
//     Map<String, Object> getVariables();
// 
//     @ApiModelProperty(value = "Array of recipients in an array of strings in format \"example@example.org\" or \"Annie Example <annie@example.com>\"", required = true)
//     Collection<String> getRecipients();
// }
// 
// Path: src/main/java/uk/gov/homeoffice/emailapi/templatedemailfactory/TemplatedEmailFactory.java
// public interface TemplatedEmailFactory {
//     Email build(TemplatedEmail templatedEmail)
//         throws EmailException, TemplatePopulatorParsingException, TemplatePopulatorIOException,
//         InternetAddressParsingException;
// }
// 
// Path: src/main/java/uk/gov/homeoffice/emailapi/templatedemailfactory/addressparsing/InternetAddressParsingException.java
// public class InternetAddressParsingException extends Exception {
//     public InternetAddressParsingException(final Throwable cause) {
//         super(cause);
//     }
// }
// 
// Path: src/main/java/uk/gov/homeoffice/emailapi/templatedemailfactory/templating/TemplatePopulatorIOException.java
// public class TemplatePopulatorIOException extends Exception {
//     public TemplatePopulatorIOException(final Throwable cause) {
//         super(cause);
//     }
// }
// 
// Path: src/main/java/uk/gov/homeoffice/emailapi/templatedemailfactory/templating/TemplatePopulatorParsingException.java
// public class TemplatePopulatorParsingException extends Exception {
//     public TemplatePopulatorParsingException(Throwable cause) {
//         super(cause);
//     }
// 
//     public TemplatePopulatorParsingException(String message) {
//         super(message);
//     }
// }


// Path: src/test/java/uk/gov/homeoffice/emailapi/service/TemplatedEmailSenderImplTest.java
import org.apache.commons.mail.Email;
import org.apache.commons.mail.EmailException;
import org.junit.Test;
import uk.gov.homeoffice.emailapi.entities.TemplatedEmail;
import uk.gov.homeoffice.emailapi.templatedemailfactory.TemplatedEmailFactory;
import uk.gov.homeoffice.emailapi.templatedemailfactory.addressparsing.InternetAddressParsingException;
import uk.gov.homeoffice.emailapi.templatedemailfactory.templating.TemplatePopulatorIOException;
import uk.gov.homeoffice.emailapi.templatedemailfactory.templating.TemplatePopulatorParsingException;
import static org.mockito.Mockito.*;

package uk.gov.homeoffice.emailapi.service;



public class TemplatedEmailSenderImplTest {

    @Test
    public void itGetsATemplatedEmailAndSendsIt()
        throws TemplatePopulatorParsingException, InternetAddressParsingException,
        TemplatePopulatorIOException, EmailException {
        final TemplatedEmail mockTemplatedEmail = mock(TemplatedEmail.class);
        final Email mockEmail = mock(Email.class);
        final TemplatedEmailFactory mockFactory = mock(TemplatedEmailFactory.class);