AmazonEmailer implements Emailer { @Override public void sendAsHtml(String subject, String body, String... recipients) { Body requestBody = new Body().withHtml(new Content(body)); sendEmail(subject, requestBody, recipients); } AmazonEmailer(AmazonSimpleEmailService emailService,
                         String fromAddress); @Override void send(String subject, String body, String... recipients); @Override void sendAsHtml(String subject, String body, String... recipients);  }
@Test public void testSendAsHtml() throws Exception { Capture capturedRequest = createSendMockExpectation(); String subject = "subject"; String body = "body text"; String[] recipients = {"x@y.com", "a@b.org"}; emailer.sendAsHtml(subject, body, recipients); boolean asHtml = true; verifyRequest(capturedRequest, subject, body, recipients, asHtml); }