public void checkPAT(String serverUrl, String token) {
    String url = String.format("%s/_apis/projects?%s", getTrimmedUrl(serverUrl), API_VERSION_3);
    doGet(token, url);
  }
@Test
  public void check_pat_with_server_error() {
    enqueueResponse(500);

    String serverUrl = server.url("").toString();
    assertThatThrownBy(() -> underTest.checkPAT(serverUrl, "token"))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("Unable to contact Azure DevOps server");
  }