Fixes and Improves tests for Transport.establish_connection()