GitApiHelper { public URI buildDownloadURI(final URI gitRepositoryUri, @Nullable final String ref) { GitArtifactInfo info = GitRepoUriParser.parseGitRepoUri(gitRepositoryUri, ref); GitProviderConfig config = prepareConfig(info.getHost()); String downloadLink = String.format( config.template, config.apiUri, info.getVendor(), info.getRepository(), info.getRef() != null ? info.getRef() : config.defaultBranch); return URI.create(downloadLink); } @Inject  GitApiHelper(
      @Named("${nexus.cocoapods.gitHubApiUri:-https://api.github.com}") final String githubApiUri,
      @Named("${nexus.cocoapods.bitbucketApiUri:-https://bitbucket.org}") final String bitbucketApiUri,
      @Named("${nexus.cocoapods.gitlabApiUri:-https://gitlab.com}") final String gitlabApiUri); URI buildDownloadURI(final URI gitRepositoryUri, @Nullable final String ref);  }
@Test @Parameters(method = "provideTestGenerateGitHubApiUriParams") public void testGenerateGitHubApiUri( final String gitUri, final String ref, final String downloadUri) { GitApiHelper gitApiHelper = new GitApiHelper("https: assertThat(gitApiHelper.buildDownloadURI(URI.create(gitUri), ref).toString(), is(downloadUri)); }