@Override
      public int read() throws IOException {
        // this represents any exception - bad behavior or closure before being read completely.
        throw new IllegalStateException(errMsg);
      }
Tests that the right exceptions are thrown when the provided {@link InputStream} has unexpected behavior.
@throws Exception
ambry-commons/src/test/java/com/github/ambry/commons/InputStreamReadableStreamChannelTest.java