@Test
public void testCopyStream() throws Exception {

    RuleDatabaseItemUpdateRunnable itemUpdateRunnable = new RuleDatabaseItemUpdateRunnable(realTask, mockContext, mock(Configuration.Item.class));
    byte[] bar = new byte[]{'h', 'a', 'l', 'l', 'o'};
    ByteArrayInputStream bis = new ByteArrayInputStream(bar);
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    itemUpdateRunnable.copyStream(bis, bos);
    assertArrayEquals(bar, bos.toByteArray());
}