public static void readInputStreamAndValidateSize(InputStream inputStream, long expectedLength) throws IOException {
    int readVal = 0;
    long numRead = 0;
    do {
      readVal = inputStream.read();
      numRead++;
    } while (readVal != -1);
    numRead--;
    Assert.assertEquals("Unexpected inputstream read length", expectedLength, numRead);
  }
Read through the {@code inputStream} using the no-arg read method until {@code -1} is returned,
and verify that the expected number of bytes {@code expectedLength} is read.
@param inputStream
@param expectedLength
@throws IOException
ambry-test-utils/src/main/java/com/github/ambry/utils/TestUtils.java