@Test
    public void notIdeal() throws NoSuchAlgorithmException {
        SdkTLSSocketFactory f = new SdkTLSSocketFactory(SSLContext.getDefault(), null);
        TestSSLSocket socket = new TestSSLSocket() {
            @Override
            public String[] getSupportedProtocols() {
                return shuffle(new String[]{"SSLv2Hello", "SSLv3", "TLSv1", "TLSv1.1"});
            }
            @Override
            public String[] getEnabledProtocols() {
                return shuffle(new String[]{"SSLv3", "TLSv1"});
            }
        };
        f.prepareSocket(socket);
        assertArrayEquals(new String[]{"TLSv1.1", "TLSv1", "SSLv3"},
                          socket.getCapturedProtocols());
    }
Test when the edge case when the both supported and enabled protocols are null.
aws-java-sdk-core/src/test/java/com/amazonaws/http/conn/ssl/SdkTLSSocketFactoryTest.java