code: public void createCertificate(InputStream certStream, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException, CertificateException, NoSuchAlgorithmException {
          CertificateFactory x509CertFact = CertificateFactory.getInstance("X.509");
          X509Certificate cert = (X509Certificate) x509CertFact.generateCertificate(certStream);
  
          CertificateAddParameter addParam = new CertificateAddParameter()
              .withCertificateFormat(CertificateFormat.CER)
              .withThumbprintAlgorithm(SHA1_CERTIFICATE_ALGORITHM)
              .withThumbprint(getThumbPrint(cert))
              .withData(Base64.encodeBase64String(cert.getEncoded()));
  
          createCertificate(addParam, additionalBehaviors);
      }
docs: Adds a certificate to the Batch account.
  
  @param certStream The certificate data in .cer format.
  @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request.
  @throws BatchErrorException Exception thrown when an error response is received from the Batch service.
  @throws IOException Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
  @throws CertificateException Exception thrown when an error is encountered processing the provided certificate.
  @throws NoSuchAlgorithmException Exception thrown if the X.509 provider is not registered in the Java security provider list.