code: public HttpClientResponseBuilder doThrowException(IOException exception) {
          newRule.addAction(new ExceptionAction(exception));
          return new HttpClientResponseBuilder(newRule);
      }
docs: Adds action which throws provided exception.
  
  @param exception exception to be thrown
  @return response builder