### Question:
MicrosoftExchangeNotificationSender extends NotificationSender { @Override public void sendEmailWithAttachments(EmailWithAttachmentsDTO in, Authentication authentication, String userId) throws Exception { AcmUser user = getUserDao().findByUserId(userId); sendEmailWithAttachments(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 testSendEmailWithAttachments() throws Exception { OutlookDTO outlookDTO = new OutlookDTO(); outlookDTO.setOutlookPassword("outlookPassword"); expect(mockEmailWithAttachmentsDTO.getTemplate()).andReturn("Some template"); Capture<AcmUser> userCapture = EasyMock.newCapture(); mockOutlookService.sendEmailWithAttachments(eq(mockEmailWithAttachmentsDTO), eq(mockAuthentication), capture(userCapture)); replayAll(); microsoftExchangeNotificationSender.sendEmailWithAttachments(mockEmailWithAttachmentsDTO, mockAuthentication, mockAcmUser); verifyAll(); }