public String getBaseUrl() {
    String url = config.get(SERVER_BASE_URL).orElse("");
    if (isEmpty(url)) {
      url = computeBaseUrl();
    }
    // Remove trailing slashes
    return StringUtils.removeEnd(url, "/");
  }
@Test
  public void remove_trailing_slash() {
    settings.setProperty("sonar.core.serverBaseURL", "http://mydomain.com/");

    assertThat(underTest().getBaseUrl()).isEqualTo("http://mydomain.com");
  }