int count = IOUtils.copy(reader, writer);
out.off();
writer.flush();
assertEquals("The number of characters returned by copy is wrong", inData.length, count);
assertEquals("Sizes differ", inData.length, baout.size());
assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
}
public void testCopy_readerToWriter_nullIn() throws Exception {
ByteArrayOutputStream baout = new ByteArrayOutputStream();
OutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);