Add unit test for ssl upgrade of existing NetSocket