@Override
  public int read(byte b[], int off, int len) throws IOException {
    sleep();
    // simulate partial data availability.
    int lenToRead = Math.min(len, InputStreamReadableStreamChannel.BUFFER_SIZE / 2 - 1);
    return stream.read(b, off, lenToRead);
  }
Constructs a HaltingInputStream from the provided {@code stream}.
</p>
Sleeps before calling the read methods on the underlying stream. In the case of {@link #read(byte[], int, int)},
reads only the min of the length provided and a fixed size.
@param stream the {@link InputStream} to use to provide the actual data.
ambry-commons/src/test/java/com/github/ambry/commons/InputStreamReadableStreamChannelTest.java