uri = crypto.encrypt(doc.getUri());
}
@Test
public void serve() throws Exception {
MockHttpServletResponse response = new MockHttpServletResponse();
response.setOutputStreamAccessAllowed(true);
controller.serve(crypto.encrypt("no"), null, null, response);
assertEquals("File could not be found", MockHttpServletResponse.SC_NOT_FOUND, response.getStatus());
controller.serve(uri, null, null, response);
assertTrue("Content streamed" , response.getContentAsByteArray().length > 1000);
}