### Question:
DefaultResponseErrorHandler implements ResponseErrorHandler { @Override public boolean hasError(final ClientHttpResponse response) throws IOException { return response.getStatusCode().is5xxServerError(); }  @Override boolean hasError(final ClientHttpResponse response); @Override void handleError(final ClientHttpResponse response);  }### Answer:
@Test public void test_hasError_onlyServerErrors() { Arrays.stream(HttpStatus.values()).forEach(statusCode -> { try { when(clientHttpResponse.getStatusCode()).thenReturn(statusCode); final boolean result = errorHandler.hasError(clientHttpResponse); if (statusCode.is5xxServerError()) { assertTrue(result); } else { assertFalse(result); } } catch (final IOException ex) { throw new RuntimeException(ex); } }); }