Added unit test for InvalidSocketException