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 getBaseUrl_does_not_cache_returned_value() {
    assertThat(underTest().getBaseUrl()).isEqualTo("http://localhost:9000");
    settings.setProperty(HOST_PROPERTY, "foo");
    assertThat(underTest().getBaseUrl()).isEqualTo("http://foo:9000");
    settings.setProperty(PORT_PORPERTY, 666);
    assertThat(underTest().getBaseUrl()).isEqualTo("http://foo:666");
    settings.setProperty(CONTEXT_PROPERTY, "/bar");
    assertThat(underTest().getBaseUrl()).isEqualTo("http://foo:666/bar");
  }