@Test
public void getOrganizationsWithCredentialId() throws IOException, UnirestException {

    String credentialId = createCredential(BitbucketCloudScm.ID);
    List orgs = new RequestBuilder(baseUrl)
            .status(200)
            .jwtToken(getJwtToken(j.jenkins, authenticatedUser.getId(), authenticatedUser.getId()))
            .get("/organizations/jenkins/scm/"+BitbucketCloudScm.ID+"/organizations/"+getApiUrlParam()+"&credentialId="+credentialId)
            .build(List.class);
    assertEquals(2, orgs.size());
    assertEquals(BbCloudWireMock.USER_UUID, ((Map)orgs.get(0)).get("key"));
    assertEquals("Vivek Pandey", ((Map)orgs.get(0)).get("name"));
    assertEquals(BbCloudWireMock.TEAM_UUID, ((Map)orgs.get(1)).get("key"));
    assertEquals("Vivek's Team", ((Map)orgs.get(1)).get("name"));
}