+ CloseableHttpClient httpClient = PowerMock.createMock(CloseableHttpClient.class);
+ when(HttpsUtils.getHttpClient(30000)).thenReturn(httpClient);
+ HttpGet httpGet = new HttpGet(url);
+ PowerMock.expectNew(HttpGet.class, url).andReturn(httpGet);
+ when(HttpsUtils.get(httpGet, headers, httpClient)).thenThrow(new CorrelationException(""));
+ PowerMock.expectPrivate(httpClient, "close");
+ EasyMock.expectLastCall();