@Test
public void testCopy() throws IOException {

  byte[] testArray = PipedOutputStreamTest.generateTestStr(10001).toString().getBytes(StandardCharsets.UTF_8);
  InputStream bis = new ByteArrayInputStream(testArray);
  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  Streams.copy(bis, bos);
  Assert.assertArrayEquals(testArray, bos.toByteArray());
}