ApacheBaseApi extends BaseApi { public static String buildHttpGetParams(List<NameValuePair> params) throws UnsupportedEncodingException { try { return new URIBuilder().addParameters(params).build().toString(); } catch (URISyntaxException e) { throw new RuntimeException(e); } }  @Override void init(Library library, HttpClientFactory http_client_factory); String httpGet(String url, String encoding, boolean ignore_errors,
            CookieStore cookieStore); String httpGet(String url, String encoding, boolean ignore_errors); String httpGet(String url, String encoding); @Deprecated String httpGet(String url); String httpPost(String url, HttpEntity data,
            String encoding, boolean ignore_errors, CookieStore cookieStore); String httpPost(String url, HttpEntity data,
            String encoding, boolean ignore_errors); String httpPost(String url, HttpEntity data,
            String encoding); @Deprecated String httpPost(String url, HttpEntity data); static String buildHttpGetParams(List<NameValuePair> params); void setHttpLoggingEnabled(boolean httpLoggingEnabled); public HttpClient http_client; }
@Test public void testBuildHttpGetParamsList() throws Exception { assertThat(ApacheBaseApi.buildHttpGetParams(Arrays.<NameValuePair>asList( new BasicNameValuePair("foo", "bar"), new BasicNameValuePair("space", " "), new BasicNameValuePair("percent", "%") )), is("?foo=bar&space=+&percent=%25")); }