HttpRequester { public static URI createURI(String baseUrl, String path, String... queryParams) { UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(baseUrl).path(path); if (queryParams != null) { if (queryParams.length % 2 != 0) { throw new IllegalArgumentException("invalid queryParams count"); } for (int i = 0; i < queryParams.length; i += 2) { builder.queryParam(queryParams[i], queryParams[i + 1]); } } return builder.build().encode().toUri(); } HttpRequester();  HttpRequester(Properties securityProperties);   HttpRequester(Properties securityProperties, RestTemplate restTemplate); RestTemplate getRestTemplate(); T get(URI url, Class<T> responseType); T post(URI url, Object content, Class<T> responseType); Object executeWithResponseExtractor(URI url); static URI createURI(String baseUrl, String path, String... queryParams);  }
@Test public void createURI() throws Exception { requester = new HttpRequester(); assertThat(requester.createURI("http: .isEqualTo("http: assertThat(requester.createURI("http: .isEqualTo("http: assertThat(requester.createURI("http: .isEqualTo("http: assertThatThrownBy(() -> requester.createURI("http: .isInstanceOf(IllegalArgumentException.class); }