### Question:
HttpRequest { public String getFullUrl() { if (StrUtils.isNotEmpty(fullUrl)) { return fullUrl; } return fullUrl = createFullUrl(); } HttpRequest(Builder builder); HttpMethod getMethod(); HttpHeaders getHeaders(); Map<String, List<String>> getParams(); byte[] getBody(); String getPath(); String getUrl(); String getFullUrl(); String getParam(String key); Boolean getBoolParam(String key); @Override String toString();  }### Answer:
@Test public void testFullUrlWithoutProtocol() { HttpRequest req0 = new HttpRequest.Builder() .url("localhost:8086/write") .params(MapUtils.of("k1", singletonList("v1"))) .get() .build(); Assert.assertEquals("http: HttpRequest req1 = new HttpRequest.Builder() .url("localhost:8086/write?") .params(MapUtils.of("k1", singletonList("v1"))) .get() .build(); Assert.assertEquals("http: HttpRequest req2 = new HttpRequest.Builder() .url("localhost:8086/write?k1=v1") .params(MapUtils.of("k2", singletonList("v2"))) .post("abcd") .build(); Assert.assertEquals("http: }
@Test public void testFullUrlWithProtocol() { HttpRequest req0 = new HttpRequest.Builder() .url("http: .params(MapUtils.of("k1", singletonList("v1"))) .get() .build(); Assert.assertEquals("http: HttpRequest req1 = new HttpRequest.Builder() .url("http: .params(MapUtils.of("k1", singletonList("v1"))) .get() .build(); Assert.assertEquals("http: HttpRequest req2 = new HttpRequest.Builder() .url("https: .params(MapUtils.of("k2", singletonList("v2"))) .post("abcd") .build(); Assert.assertEquals("https: }