@NonNull
    @Override
    public String getId() {
        return ID;
    }
@Test
    public void getScmNormalizedUrlTest() throws IOException, UnirestException {
        String credentialId = createCredential(BitbucketServerScm.ID);

        String apiUrl = this.apiUrl;
        String normalizedUrl = BitbucketEndpointConfiguration.normalizeServerUrl(apiUrl);
        String expectedCredId = BitbucketServerScm.ID+":"+ DigestUtils.sha256Hex(normalizedUrl);
        assertEquals(credentialId, expectedCredId);

        Map r = new RequestBuilder(baseUrl)
                .crumb(crumb)
                .status(200)
                .jwtToken(getJwtToken(j.jenkins, authenticatedUser.getId(), authenticatedUser.getId()))
                .post("/organizations/jenkins/scm/"+BitbucketServerScm.ID+"/"+String.format("?apiUrl=%s",apiUrl))
                .build(Map.class);

        assertEquals(normalizedUrl, r.get("uri"));
        assertEquals(expectedCredId, r.get("credentialId"));
        String apiUrlWithSlash = this.apiUrl+"/";
        assertNotEquals(apiUrl, apiUrlWithSlash);
        String normalizedUrlWithSlash = BitbucketEndpointConfiguration.normalizeServerUrl(apiUrl);
        assertEquals(normalizedUrl, normalizedUrlWithSlash);

        String expectedCredIdWithSlash = BitbucketServerScm.ID+":"+ DigestUtils.sha256Hex(normalizedUrlWithSlash);
        assertEquals(expectedCredId, expectedCredIdWithSlash);

        r = new RequestBuilder(baseUrl)
                .crumb(crumb)
                .status(200)
                .jwtToken(getJwtToken(j.jenkins, authenticatedUser.getId(), authenticatedUser.getId()))
                .post("/organizations/jenkins/scm/"+BitbucketServerScm.ID+"/"+String.format("?apiUrl=%s",apiUrl))
                .build(Map.class);

        assertEquals(expectedCredId, r.get("credentialId"));
        assertEquals(normalizedUrl, r.get("uri"));
    }