private void consumeStream(InvocationOnMock invocation) throws IOException {
    long size = invocation.getArgument(1);
    InputStream inputStream = invocation.getArgument(3);
    for (int j = 0; j < size; j++) {
      if (inputStream.read() == -1) {
        throw new EOFException("end of stream");
      }
    }
  }
Consume the input stream passed to the uploadBlob mock invocation.
@param invocation
@throws IOException
ambry-vcr/src/test/java/com/github/ambry/vcr/CloudBlobStoreTest.java