@Test
public void testMultiplePortsSSL() throws Exception {

  SSLContext sslContext = SSLContext.getInstance("TLS");
  sslContext.init(null, new TrustManager[]{new X509TrustManager() {
      @Override
      public void checkClientTrusted(X509Certificate[] certs, String s) {
        // nothing
      }
      @Override
      public void checkServerTrusted(X509Certificate[] certs, String s) {
        // nothing
      }
      @Override
      public X509Certificate[] getAcceptedIssuers() {
        return new X509Certificate[0];
      }
    } },
      null);
  SocketFactory socketFactory = sslContext.getSocketFactory();
  Context context = new Context();
  context.put("ssl", "true");
  context.put("keystore", "src/test/resources/server.p12");
  context.put("keystore-password", "password");
  context.put("keystore-type", "PKCS12");
  MultiportSyslogTCPSource source = new MultiportSyslogTCPSource();
  Channel channel = new MemoryChannel();
  List<Event> channelEvents = new ArrayList<>();
  int numPorts = 10;
  List<Integer> portList = testNPorts(source, channel, channelEvents,
      numPorts, null, getSSLEventSender(socketFactory), context);
  //Since events can arrive out of order, search for each event in the array
  processEvents(channelEvents, numPorts, portList);
  source.stop();
}