@Override
  public DevOpsProjectCreationContext create(AlmSettingDto almSettingDto, DevOpsProjectDescriptor devOpsProjectDescriptor) {
    String url = requireNonNull(almSettingDto.getUrl(), "DevOps Platform url cannot be null");
    Long gitlabProjectId = getGitlabProjectId(devOpsProjectDescriptor);
    String pat = findPersonalAccessTokenOrThrow(almSettingDto);
    Project gitlabProject = fetchGitlabProject(url, pat, gitlabProjectId);
    String defaultBranchName = getDefaultBranchOnGitlab(url, pat, gitlabProjectId).orElse(null);

    return new DevOpsProjectCreationContext(gitlabProject.getName(), gitlabProject.getPathWithNamespace(),
      String.valueOf(gitlabProjectId), gitlabProject.getVisibility().equals("public"), defaultBranchName, almSettingDto, userSession);

  }
@Test
  void create_whenGitlabProjectIdIsInvalid_throws() {
    DevOpsProjectDescriptor devOpsProjectDescriptor = mock();
    when(devOpsProjectDescriptor.repositoryIdentifier()).thenReturn("invalid");

    assertThatIllegalArgumentException()
      .isThrownBy(() -> gitlabDevOpsProjectService.create(ALM_SETTING_DTO, devOpsProjectDescriptor))
      .withMessage("GitLab project identifier must be a number, was 'invalid'");
  }