public Project getProject(String gitlabUrl, String pat, Long gitlabProjectId) {
    String url = format("%s/projects/%s", gitlabUrl, gitlabProjectId);
    LOG.debug("get project : [{}]", url);
    Request request = new Request.Builder()
      .addHeader(PRIVATE_TOKEN, pat)
      .get()
      .url(url)
      .build();

    try (Response response = client.newCall(request).execute()) {
      checkResponseIsSuccessful(response);
      String body = response.body().string();
      LOG.trace("loading project payload result : [{}]", body);
      return new GsonBuilder().create().fromJson(body, Project.class);
    } catch (JsonSyntaxException e) {
      throw new IllegalArgumentException("Could not parse GitLab answer to retrieve a project. Got a non-json payload as result.");
    } catch (IOException e) {
      logException(url, e);
      throw new IllegalStateException(e.getMessage(), e);
    }
  }
@Test
  public void get_project() {
    MockResponse response = new MockResponse()
      .setResponseCode(200)
      .setBody("""
        {
            "id": 12345,
            "name": "SonarQube example 1",
            "name_with_namespace": "SonarSource / SonarQube / SonarQube example 1",
            "path": "sonarqube-example-1",
            "path_with_namespace": "sonarsource/sonarqube/sonarqube-example-1",
            "visibility": "visibilityFromGitLab",
            "web_url": "https://example.gitlab.com/sonarsource/sonarqube/sonarqube-example-1"
          }
        """);
    server.enqueue(response);

    assertThat(underTest.getProject(gitlabUrl, "pat", 12345L))
      .extracting(Project::getId, Project::getName, Project::getVisibility)
      .containsExactly(12345L, "SonarQube example 1", "visibilityFromGitLab");
  }