public void testOutputStream() throws IOException {
byte[] data = data();
MockServletOutputStream mock = new MockServletOutputStream();
MonitorOutputStream out = new MonitorOutputStream(mock);
out.write(data);
assertEquals(data.length, mock.getBinaryContent().length);
assertEquals(data.length, out.getBytesWritten());
}