@Test public void testSendEmailWithEmbeddedLinks() throws Exception { List<EmailWithEmbeddedLinksResultDTO> returnList = new ArrayList<>(); Capture<String> templateCapture = EasyMock.newCapture(); mockEmailWithEmbeddedLinksDTO.setTemplate(capture(templateCapture)); expect(mockEmailWithEmbeddedLinksDTO.getTemplate()).andReturn(null); expect(mockSmtpService.sendEmailWithEmbeddedLinks(mockEmailWithEmbeddedLinksDTO, mockAuthentication, mockAcmUser)) .andReturn(returnList); replayAll(); List<EmailWithEmbeddedLinksResultDTO> resultList = smtpNotificationSender.sendEmailWithEmbeddedLinks(mockEmailWithEmbeddedLinksDTO, mockAuthentication, mockAcmUser); verifyAll(); assertThat(resultList.isEmpty(), is(true)); }
@Override public List<EmailWithEmbeddedLinksResultDTO> sendEmailWithEmbeddedLinks(EmailWithEmbeddedLinksDTO in, Authentication authentication, AcmUser user) throws Exception { if (in.getTemplate() == null) { in.setTemplate(notificationTemplate); } return getEmailSenderService().sendEmailWithEmbeddedLinks(in, authentication, user); }
SmtpNotificationSender extends NotificationSender { @Override public List<EmailWithEmbeddedLinksResultDTO> sendEmailWithEmbeddedLinks(EmailWithEmbeddedLinksDTO in, Authentication authentication, AcmUser user) throws Exception { if (in.getTemplate() == null) { in.setTemplate(notificationTemplate); } return getEmailSenderService().sendEmailWithEmbeddedLinks(in, authentication, user); } }
SmtpNotificationSender extends NotificationSender { @Override public List<EmailWithEmbeddedLinksResultDTO> sendEmailWithEmbeddedLinks(EmailWithEmbeddedLinksDTO in, Authentication authentication, AcmUser user) throws Exception { if (in.getTemplate() == null) { in.setTemplate(notificationTemplate); } return getEmailSenderService().sendEmailWithEmbeddedLinks(in, authentication, user); }  }
SmtpNotificationSender extends NotificationSender { @Override public List<EmailWithEmbeddedLinksResultDTO> sendEmailWithEmbeddedLinks(EmailWithEmbeddedLinksDTO in, Authentication authentication, AcmUser user) throws Exception { if (in.getTemplate() == null) { in.setTemplate(notificationTemplate); } return getEmailSenderService().sendEmailWithEmbeddedLinks(in, authentication, user); }  @Override void sendPlainEmail(Stream<T> emailsDataStream, EmailBuilder<T> emailBuilder, EmailBodyBuilder<T> emailBodyBuilder); @Override void sendEmailWithAttachments(EmailWithAttachmentsDTO in, Authentication authentication, String userId); @Override void sendEmailWithAttachments(EmailWithAttachmentsDTO in, Authentication authentication, AcmUser user); @Override void sendEmailWithAttachmentsAndLinks(EmailWithAttachmentsAndLinksDTO in, Authentication authentication, AcmUser user); @Override List<EmailWithEmbeddedLinksResultDTO> sendEmailWithEmbeddedLinks(EmailWithEmbeddedLinksDTO in, Authentication authentication,
            AcmUser user); }
SmtpNotificationSender extends NotificationSender { @Override public List<EmailWithEmbeddedLinksResultDTO> sendEmailWithEmbeddedLinks(EmailWithEmbeddedLinksDTO in, Authentication authentication, AcmUser user) throws Exception { if (in.getTemplate() == null) { in.setTemplate(notificationTemplate); } return getEmailSenderService().sendEmailWithEmbeddedLinks(in, authentication, user); }  @Override void sendPlainEmail(Stream<T> emailsDataStream, EmailBuilder<T> emailBuilder, EmailBodyBuilder<T> emailBodyBuilder); @Override void sendEmailWithAttachments(EmailWithAttachmentsDTO in, Authentication authentication, String userId); @Override void sendEmailWithAttachments(EmailWithAttachmentsDTO in, Authentication authentication, AcmUser user); @Override void sendEmailWithAttachmentsAndLinks(EmailWithAttachmentsAndLinksDTO in, Authentication authentication, AcmUser user); @Override List<EmailWithEmbeddedLinksResultDTO> sendEmailWithEmbeddedLinks(EmailWithEmbeddedLinksDTO in, Authentication authentication,
            AcmUser user);  }