@Test
public void sendSimpleEmailTest() throws Exception {

    CompletableFuture<Set<String>> cf = es.sendSimpleEmail(SUBJECT_LINE, TEXT_MESSAGE, TO_EMAIL_ADDRESS);
    Set<String> failedEmails = cf.get();
    assertEquals(0, failedEmails.size());
    List<SmtpMessage> emails = smtpServer.getReceivedEmails();
    assertEquals(1, emails.size());
    SmtpMessage email = emails.get(0);
    assertEquals(SUBJECT_LINE, email.getHeaderValue("Subject"));
    assertEquals(TO_EMAIL_ADDRESS, email.getHeaderValue("From"));
    assertTrue(email.getBody().contains(TEXT_MESSAGE));
}