Add a test for passing the SSL context.
Fixup/refactor tests.