@Override
  public void close() throws IOException {
    isOpen.set(false);
    if (runtimeExceptionCallback != null) {
      runtimeExceptionCallback.onCompletion((long) 0, exceptionToThrow);
    }
  }
Creates an instance of BadAsyncWritableChannel that throws {@code exceptionToThrow} on write.
@param exceptionToThrow the {@link Exception} to throw on write.
ambry-rest/src/test/java/com/github/ambry/rest/NettyRequestTest.java