### Question:
SmtpNotificationSender extends NotificationSender { @Override public void sendEmailWithAttachmentsAndLinks(EmailWithAttachmentsAndLinksDTO in, Authentication authentication, AcmUser user) throws Exception { if (in.getTemplate() == null) { in.setTemplate(notificationTemplate); } getEmailSenderService().sendEmailWithAttachmentsAndLinks(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 testSendEmailWithAttachmentsAndLinks() throws MuleException, AcmEncryptionException, Exception { Capture<String> templateCapture = EasyMock.newCapture(); mockEmailWithAttachmentsAndLinksDTO.setTemplate(capture(templateCapture)); expect(mockEmailWithAttachmentsAndLinksDTO.getTemplate()).andReturn(null); mockSmtpService.sendEmailWithAttachmentsAndLinks(mockEmailWithAttachmentsAndLinksDTO, mockAuthentication, mockAcmUser); expectLastCall(); replayAll(); smtpNotificationSender.sendEmailWithAttachmentsAndLinks(mockEmailWithAttachmentsAndLinksDTO, mockAuthentication, mockAcmUser); verifyAll(); }