source: class HttpFormatterTest {
  
    @Test
    public void itDoesElideAuthTokensInUrl() throws Exception {
  
target:     assertThat(
          HttpFormatter.urlWithRedactedToken(
              "https://slack.com/api/channels.info?token=xoxb-000000000000-AAAAAAoM5xCesZ1d9HDFhKMG"
          )
      )
          .describedAs("If it looks like a URL with only the raw token, we should redact the full token, providing just a fingerprint")
          .isEqualTo("https://slack.com/api/channels.info?token=xox...hKMG");
  
      assertThat(
          HttpFormatter.urlWithRedactedToken(
              "https://slack.com/api/channels.info?foo=bar&token=xoxb-000000000000-AAAAAAoM5xCesZ1d9HDFhKMG&baz=why"
          )
      )
          .describedAs("If it looks like a URL with the raw token and other query params, we should redact the full token, providing just a fingerprint")
          .isEqualTo("https://slack.com/api/channels.info?foo=bar&token=xox...hKMG&baz=why");
    }
  
  }