@Test
  public void testSSLFactory() throws Exception {
    TestSSLUtils.testSSLFactoryImpl(JdkSslFactory.class.getName());

    // test features specific to JDK impls, like the PRNG algorithm config
    File trustStoreFile = File.createTempFile("truststore", ".jks");
    Properties props = new Properties();
    TestSSLUtils.addSSLProperties(props, "DC1,DC2,DC3", SSLFactory.Mode.CLIENT, trustStoreFile, "client");
    for (String prngAlgorithm : new String[]{"NativePRNGNonBlocking", "SHA1PRNG", "Windows-PRNG", "badbadinvalid"}) {
      // First check if the algorithm is supported by the system/jdk/security provider.
      boolean valid = true;
      try {
        SecureRandom.getInstance(prngAlgorithm);
      } catch (NoSuchAlgorithmException e) {
        valid = false;
      }
      props.put("ssl.secure.random.algorithm", prngAlgorithm);
      SSLConfig config = new SSLConfig(new VerifiableProperties(props));
      if (valid) {
        JdkSslFactory jdkSslFactory = new JdkSslFactory(config);
        assertNotNull("Invalid SSLContext", jdkSslFactory.getSSLContext());
      } else {
        TestUtils.assertException(NoSuchAlgorithmException.class, () -> new JdkSslFactory(config), null);
      }
    }
    // leaving this prop empty should use the default impl.
    props.put("ssl.secure.random.algorithm", "");
    SSLConfig config = new SSLConfig(new VerifiableProperties(props));
    JdkSslFactory jdkSslFactory = new JdkSslFactory(config);
    assertNotNull("Invalid SSLContext", jdkSslFactory.getSSLContext());
  }
Run sanity checks for {@link JdkSslFactory}.
@throws Exception
ambry-commons/src/test/java/com/github/ambry/commons/JdkSslFactoryTest.java