code: private synchronized PublicKey fetchPublicKey(JsonNode messageJson) {
          URI certUrl = URI.create(messageJson.get(SIGNING_CERT_URL).asText());
          PublicKey publicKey = certificateCache.get(certUrl.toString());
          if (publicKey == null) {
              publicKey = createPublicKey(downloadCertWithRetries(certUrl));
              certificateCache.add(certUrl.toString(), publicKey);
          }
          return publicKey;
      }
docs: Retrieve the certificate public key from the cache if available, otherwise download it from the URL
  in the message JSON.
  
  @param messageJson Message JSON.
  @return Public key of SNS certificate.