public GsonAzureProjectList getProjects(String serverUrl, String token) {
    String url = String.format("%s/_apis/projects?%s", getTrimmedUrl(serverUrl), API_VERSION_3);
    return doGet(token, url, r -> buildGson().fromJson(r.body().charStream(), GsonAzureProjectList.class));
  }
@Test
  public void get_projects_with_invalid_pat() {
    enqueueResponse(401);

    assertThatThrownBy(() -> underTest.getProjects(server.url("").toString(), "invalid-token"))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("Invalid personal access token");

    assertThat(logTester.logs(Level.ERROR)).hasSize(1);
    assertThat(logTester.logs(Level.ERROR).iterator().next())
      .contains("Unable to contact Azure DevOps server for request [" + server.url("") + "_apis/projects?api-version=3.0]: Invalid personal access token");
  }