@Test
public void testCopyBytesShouldNotCloseStreamsWhenCloseIsFalse()
    throws Exception {

  InputStream inputStream = Mockito.mock(InputStream.class);
  OutputStream outputStream = Mockito.mock(OutputStream.class);
  Mockito.doReturn(-1).when(inputStream).read(new byte[1]);
  IOUtils.copyBytes(inputStream, outputStream, 1, false);
  Mockito.verify(inputStream, Mockito.atMost(0)).close();
  Mockito.verify(outputStream, Mockito.atMost(0)).close();
}