### Question:
ClientRequestException extends RuntimeException implements Closeable { @Override public void close() { try { this.getResponse().ifPresent(Response::close); } catch (Throwable ignored) { } } ClientRequestException(Throwable cause); boolean isClientError(); boolean isServerError(); boolean isConnectTimeout(); boolean isReadTimeout(); boolean isTimeout(); boolean isProcessingError(); Optional<Response> getResponse(); Optional<WebApplicationException> getWebApplicationExceptionCause(); @Override void close();  }### Answer:
@Test public void doNotFailOnCloseException() { Response mockResponse = mock(Response.class); doThrow(new RuntimeException()).when(mockResponse).close(); when(mockResponse.getStatusInfo()).thenReturn(Response.Status.OK); ClientRequestException clientRequestException = new ClientRequestException(new WebApplicationException(mockResponse)); clientRequestException.close(); clientRequestException.close(); verify(mockResponse, times(2)).close(); }