### Question:
ResponseFolderNotifyService { public void sendEmailResponseCompressNotification(Long requestId) { FOIARequest request = (FOIARequest) caseFileDao.find(requestId); String emailAddress = extractRequestorEmailAddress(request.getOriginator().getPerson()); if (emailAddress != null) { Notification responseFolderNotifier = new Notification(); responseFolderNotifier.setEmailAddresses(emailAddress); responseFolderNotifier.setTitle(String.format("%s %s", EMAIL_RESPONSE_FOLDER_ZIP, request.getCaseNumber())); responseFolderNotifier.setTemplateModelName("portalDocumentsLink"); responseFolderNotifier.setParentType(request.getObjectType()); responseFolderNotifier.setParentId(request.getId()); responseFolderNotifier.setAttachFiles(false); notificationDao.save(responseFolderNotifier); } }  AcmApplication getAcmAppConfiguration(); void setAcmAppConfiguration(AcmApplication acmAppConfiguration); void sendEmailNotification(Long requestId); void sendEmailResponseCompressNotification(Long requestId); FolderCompressor getCompressor(); void setCompressor(FolderCompressor compressor); ResponseFolderService getResponseFolderService(); void setResponseFolderService(ResponseFolderService responseFolderService); NotificationSender getNotificationSender(); void setNotificationSender(NotificationSender notificationSender); UserDao getUserDao(); void setUserDao(UserDao userDao); CaseFileDao getCaseFileDao(); void setCaseFileDao(CaseFileDao caseFileDao); NotificationDao getNotificationDao(); void setNotificationDao(NotificationDao notificationDao);  }### Answer:
@Test public void testSendEmailResponseCompressNotification() { expect(mockedCaseFileDao.find(requestId)).andReturn(mockedRequest); expect(mockedRequest.getOriginator()).andReturn(mockedPersonAssociation); expect(mockedPersonAssociation.getPerson()).andReturn(mockedPerson); expect(mockedPerson.getContactMethods()).andReturn(mockedContactMethods); expect(mockedContactMethod.getType()).andReturn(emailType); expect(mockedContactMethod.getValue()).andReturn(emailAddress); expect(mockedRequest.getRequestType()).andReturn(requestType).anyTimes(); expect(mockedRequest.getCaseNumber()).andReturn(caseNumber).anyTimes(); expect(mockedRequest.getObjectType()).andReturn(objectType).anyTimes(); expect(mockedRequest.getId()).andReturn(requestId).anyTimes(); Capture<Notification> captureReleaseNotifier = Capture.newInstance(); expect(mockNotificationDao.save(capture(captureReleaseNotifier))).andReturn(new Notification()); replayAll(); responseFolderNotifyService.sendEmailResponseCompressNotification(requestId); verifyAll(); assertEquals(String.format("%s %s", FOIAConstants.EMAIL_RESPONSE_FOLDER_ZIP, caseNumber), captureReleaseNotifier.getValue().getTitle()); assertEquals(emailAddress, captureReleaseNotifier.getValue().getEmailAddresses()); }