code: public boolean preflightRequest() {
          try {
              final URL url = buildUrl(Checksum.getSHA1Checksum(UUID.randomUUID().toString()));
              final HttpURLConnection connection = connect(url);
              if (connection.getResponseCode() != 200) {
                  LOGGER.warn("Expected 200 result from Artifactory ({}), got {}", url, connection.getResponseCode());
                  return false;
              }
              return true;
          } catch (IOException e) {
              LOGGER.error("Cannot connect to Artifactory", e);
              return false;
          }
  
      }
docs: Performs a pre-flight request to ensure the Artifactory service is
  reachable.
  
  @return <code>true</code> if Artifactory could be reached; otherwise
  <code>false</code>.