assertEquals("application/x-binary", response.getContentType());
MockServletOutputStream stream =
(MockServletOutputStream) response.getOutputStream();
assertNotNull(stream);
assertEquals(10, stream.size());
byte content[] = stream.content();
for (int i = 0; i < 10; i++) {
assertEquals("Byte at position " + i, (byte) i, content[i]);
}
assertTrue(facesContext.getResponseComplete());