HttpClient httpClient = Mockito.mock(HttpClient.class);
ClientConnectionManager connectionManager = Mockito.mock(
ClientConnectionManager.class);
when(httpClient.getConnectionManager()).thenReturn(connectionManager);
WebserviceHistoryService historyService = mock(WebserviceHistoryService.class);
when(historyService.isWebserviceInvocationAllowed(
Mockito.any(WebserviceInvocation.class))).thenReturn(allowCalls);
WebserviceInvocation invocation = mock(WebserviceInvocation.class);
List<NameValuePair> params = new ArrayList<>();