@Test
    public void testNegativeAcceptAllSSLSocketFactoryCannotWorkWithTrustStore() throws Exception{

        // test config exception happens before we even try to connect to anything

        AbstractConfiguration cm = ConfigurationManager.getConfigInstance();

        String name = "GetPostSecureTest." + testName.getMethodName();

        String configPrefix = name + "." + "ribbon";

        cm.setProperty(configPrefix + "." + CommonClientConfigKey.CustomSSLSocketFactoryClassName, "com.netflix.http4.ssl.AcceptAllSocketFactory");
        cm.setProperty(configPrefix + "." + CommonClientConfigKey.TrustStore, TEST_FILE_TS.getAbsolutePath());
        cm.setProperty(configPrefix + "." + CommonClientConfigKey.TrustStorePassword, SecureGetTest.PASSWORD);

        boolean foundCause = false;

        try {
            ClientFactory.getNamedClient(name);
        } catch(Throwable t){
             while (t != null && ! foundCause){
                 if (t instanceof IllegalArgumentException && t.getMessage().startsWith("Invalid value for property:CustomSSLSocketFactoryClassName")){
                     foundCause = true;
                     break;
                 }
                 t = t.getCause();
             }
        }

        assertTrue(foundCause);
    }
Test that the AcceptAllSocketFactory works against a dumbed down TLS server, except when it shouldn't...

@author jzarfoss
ribbon-httpclient/src/test/java/com/netflix/niws/client/http/SecureAcceptAllGetTest.java