HttpCallImpl implements HttpCall<T> { @Override public WebResource addQueryParams(final WebResource webResource, Map<String, String> queryParams) { WebResource resource = webResource; if (queryParams != null) { for (Map.Entry<String, String> entry : queryParams.entrySet()) { resource = resource.queryParam(entry.getKey(), entry.getValue()); } } return resource; } @Inject  HttpCallImpl(); @SuppressWarnings("unchecked") @Override T makeRequest(final String httpMethod, final String url, final Object data, final Class<T> toMap,
                         final Map<String, String> headers, final Map<String, String> queryParams,
                         final String accept, final String type, final int expectedStatus); @Override T makeRequest(final String httpMethod, final HttpCallConfig<T> config); @Override WebResource.Builder addHeaders(final WebResource webResource, final Map<String, String> headers,
                                          final String accept, final String type); @Override WebResource addQueryParams(final WebResource webResource, Map<String, String> queryParams); @Override T doGet(final String url, final Class<T> toMap, final Map<String, String> headers,
                   final Map<String, String> queryParams, final String accept, final int expectedStatus); @Override T doPost(final String url, final Object data, final Class<T> toMap, final Map<String, String> headers,
                    final Map<String, String> queryParams, final String accept, final String type,
                    final int expectedStatus); @Override T doPost(final HttpCallConfig<T> httpCallConfig); @Override T doGet(final HttpCallConfig<T> httpCallConfig); @Override T doPut(final HttpCallConfig<T> httpCallConfig); @Override T doDelete(final HttpCallConfig<T> httpCallConfig); @Override T doPut(final String url, final Object data, final Class<T> toMap, final Map<String, String> headers,
                   final Map<String, String> queryParams, final String accept, final String type,
                   final int expectedStatus); @Override T doDelete(final String url, final Class<T> toMap, final Map<String, String> headers,
                      final Map<String, String> queryParams, final String accept, final int expectedStatus);  }
@Test public void testAddQueryParams() throws Exception { WebResource webResource = client.resource(url); WebResource response = httpCallsImpl.addQueryParams(webResource, map); webResource = webResource.queryParam("foo", map.get("foo")); webResource = webResource.queryParam("dead", map.get("dead")); assertThat(webResource, is(response)); }