Mocked a test for SSLHandshakeException
Allow passing in of boolean to determine if we override jvm security