MockChannel addSslHandlerToPipeline() throws SSLException, CertificateException {
    if (pipeline().get(SslHandler.class) == null) {
      SelfSignedCertificate ssc = new SelfSignedCertificate();
      SslContext sslCtx = SslContextBuilder.forServer(ssc.certificate(), ssc.privateKey()).build();
      sslEngine = sslCtx.newEngine(alloc());
      pipeline().addFirst(new SslHandler(sslEngine));
    }
    return this;
  }
Add an {@link SslHandler} to the pipeline (for testing {@link NettyRequest#getSSLSession()}.
@throws SSLException
@throws CertificateException
ambry-rest/src/test/java/com/github/ambry/rest/NettyRequestTest.java