* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
controller = new DownloadController();
AttachmentService attSvc = mock(AttachmentService.class);
controller.setAttachmentService(attSvc);
fileContent = "God is good";
attInputStream = new ByteArrayInputStream(fileContent.getBytes());
when(attSvc.retrieveAttachmentContents(any(Attachment.class))).thenReturn(attInputStream);
response = mock(HttpServletResponse.class);
servletOutputStream = mock(ServletOutputStream.class);
when(response.getOutputStream()).thenReturn(servletOutputStream);
// setup attachment
att = mock(Attachment.class);