  @Test
  public void transferShouldFlushOutputStream() throws Exception {

    OutputStream output = mock(OutputStream.class);
    IoUtils.transfer(testInput, output, buffersPool);
    verify(output, atLeast(1)).write(any(byte[].class), anyInt(), anyInt());
    verify(output).flush();
  }