@Test
public void shouldHandleCircularRedirectException() throws Exception {
// given
HttpResponse httpResponse = new HttpResponse().withStatusCode(200).withBody("exampleResponse");
when(apacheHttpClientToMockServerResponseMapper.mapApacheHttpClientResponseToMockServerResponse(closeableHttpResponse, false)).thenReturn(httpResponse);
when(httpClient.execute(any(HttpUriRequest.class))).thenThrow(new IOException("TEST EXCEPTION", new CircularRedirectException("TEST EXCEPTION")));
// then
assertEquals(new HttpResponse(), apacheHttpClient.sendRequest(new HttpRequest()
.withMethod("POST")
.withURL("http://host:8080/path")