Add UDP/TCP connectivity tests.

@andresusanopinto @pthatcherg PTAL
Done, although I think the intent of the test is somewhat different than what actually happens (i.e we want to test X, but we do so via method Y), so I kept the comments.