@Test public void shouldUseHeadersToHttpResponse() throws IOException { ByteArrayDownload fd = new ByteArrayDownload(bytes, "type", "x.txt"); fd.write(response); verify(response, times(1)).setHeader("Content-type", "type"); assertArrayEquals(bytes, outputStream.toByteArray()); }
public void write(HttpServletResponse response) throws IOException { download.write(response); }
ByteArrayDownload implements Download { public void write(HttpServletResponse response) throws IOException { download.write(response); } }
ByteArrayDownload implements Download { public void write(HttpServletResponse response) throws IOException { download.write(response); } ByteArrayDownload(byte[] buff, String contentType, String fileName);  ByteArrayDownload(byte[] buff, String contentType, String fileName, boolean doDownload); }
ByteArrayDownload implements Download { public void write(HttpServletResponse response) throws IOException { download.write(response); } ByteArrayDownload(byte[] buff, String contentType, String fileName);  ByteArrayDownload(byte[] buff, String contentType, String fileName, boolean doDownload); void write(HttpServletResponse response); }
ByteArrayDownload implements Download { public void write(HttpServletResponse response) throws IOException { download.write(response); } ByteArrayDownload(byte[] buff, String contentType, String fileName);  ByteArrayDownload(byte[] buff, String contentType, String fileName, boolean doDownload); void write(HttpServletResponse response);  }