### Question:
MicrosoftExchangeNotificationSender 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);  }### Answer:
@Test public void testSendEmailWithEmbeddedLinks() throws Exception { EmailWithEmbeddedLinksResultDTO emailWithEmbeddedLinksResultDTO = new EmailWithEmbeddedLinksResultDTO("user@armedia.com", true); List<EmailWithEmbeddedLinksResultDTO> emailWithEmbeddedLinksResultDTOList = new ArrayList<>(); emailWithEmbeddedLinksResultDTOList.add(emailWithEmbeddedLinksResultDTO); OutlookDTO outlookDTO = new OutlookDTO(); outlookDTO.setOutlookPassword("outlookPassword"); expect(mockEmailWithEmbeddedLinksDTO.getTemplate()).andReturn("Some template"); Capture<EmailWithEmbeddedLinksDTO> emailWithEmbeddedLinksCapture = EasyMock.newCapture(); Capture<AcmUser> userCapture = EasyMock.newCapture(); expect(mockOutlookService.sendEmailWithEmbeddedLinks(capture(emailWithEmbeddedLinksCapture), eq(mockAuthentication), capture(userCapture))).andReturn(emailWithEmbeddedLinksResultDTOList); replayAll(); List<EmailWithEmbeddedLinksResultDTO> result = microsoftExchangeNotificationSender .sendEmailWithEmbeddedLinks(mockEmailWithEmbeddedLinksDTO, mockAuthentication, mockAcmUser); verifyAll(); assertNotNull(result); assertEquals(1, result.size()); assertEquals(result.get(0).getEmailAddress(), "user@armedia.com"); assertEquals(result.get(0).isState(), true); }