public void validateUrl(String serverUrl) {
    HttpUrl url = buildUrl(serverUrl, "/rest/api/1.0/repos");
    doGet("", url, body -> buildGson().fromJson(body, RepositoryList.class));
  }
@Test
  public void validate_url_fail_when_not_starting_with_protocol() {
    assertThatThrownBy(() -> underTest.validateUrl("any_url_not_starting_with_http.com"))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("url must start with http:// or https://");
  }