### Question:
DefaultResponseErrorHandler implements ResponseErrorHandler { @Override public void handleError(ClientHttpResponse response) throws IOException { HttpStatus statusCode = response.getStatusCode(); switch (statusCode.series()) { case CLIENT_ERROR: throw new HttpClientErrorException(statusCode, response.getStatusText(), response.getHeaders(), getResponseBody(response)); case SERVER_ERROR: throw new HttpServerErrorException(statusCode, response.getStatusText(), response.getHeaders(), getResponseBody(response)); default: throw new JenkinsClientException("Unknown status code [" + statusCode + "]"); } }  @Override boolean hasError(ClientHttpResponse response); @Override void handleError(ClientHttpResponse response);  }### Answer:
@Test public void handleError() throws Exception { thrown.expect(JenkinsClientException.class); errorHandler.handleError(new MockClientHttpResponse(HttpStatus.INTERNAL_SERVER_ERROR)); }