HttpRequestBuilder { public String getUrlAndPath() { String temp = url; if (paths == null) { if (!temp.endsWith("/")) { temp = temp + "/"; } return temp; } for (String path : paths) { if (path.startsWith("/")) { path = path.substring(1); } if (!temp.endsWith("/")) { temp = temp + "/"; } temp = temp + path; } return temp; }  HttpRequestBuilder copy(); void setUrl(String url); String getUrl(); String getHeader(String name); String getParam(String name); String getUrlAndPath(); void addPath(String path); List<String> getPaths(); void removeHeader(String name); void removeHeaderIgnoreCase(String name); void setHeaders(MultiValuedMap headers); void setHeader(String name, Object value); void setHeader(String name, String value); void setHeader(String name, List<String> values); MultiValuedMap getHeaders(); void removeParam(String name); void setParam(String name, String value); void setParam(String name, List<String> values); MultiValuedMap getParams(); void removeCookie(String name); void setCookie(Cookie cookie); Map<String, Cookie> getCookies(); void setCookies(Map<String, Cookie> cookies); void removeFormField(String name); void setFormField(String name, String value); void setFormField(String name, List<String> values); MultiValuedMap getFormFields(); void addMultiPartItem(String name, ScriptValue value); void addMultiPartItem(MultiPartItem item); List<MultiPartItem> getMultiPartItems(); ScriptValue getBody(); void setBody(ScriptValue body); void setMethod(String method); String getMethod(); String getContentType(); void setSoapAction(String soapAction); String getSoapAction(); boolean isRetry(); String getRetryUntil(); void setRetryUntil(String retryUntil);  }
@Test public void testGetUrlAndPath() { HttpRequestBuilder request = new HttpRequestBuilder(); request.setUrl("http: assertEquals("http: request = new HttpRequestBuilder(); request.setUrl("http: request.addPath("bar"); request.addPath("baz"); assertEquals("http: }