AbstractMailer { public EmailMessage createEmailMessage(final String subject, final String mimetype, final Collection<String> emailList) { final EmailMessage message = this.messageCreator.createMessage(); message.addAllToAddress(emailList); message.setMimeType(mimetype); message.setSubject(subject); return message; } AbstractMailer(final Props props, final EmailMessageCreator messageCreator); EmailMessage createEmailMessage(final String subject, final String mimetype,
      final Collection<String> emailList); String getAzkabanName();  }
@Test public void testCreateEmailMessage() { final AbstractMailer mailer = new AbstractMailer(this.props, this.messageCreator); final EmailMessage em = mailer.createEmailMessage("subject", "text/html", this.senderList); verify(this.messageCreator).createMessage(); assertThat(this.message).isEqualTo(em); verify(this.message).setSubject("subject"); }