'L{Agent._getEndpoint} return a C{HostnameEndpoint} when passed a scheme
of C{\'http\'}.'

def test_connectHTTP(self):

    expectedHost = 'example.com'
    expectedPort = 1234
    endpoint = self.agent._getEndpoint(URI.fromBytes(((('http://' + expectedHost) + ':') + intToBytes(expectedPort))))
    self.assertEqual(endpoint._hostStr, 'example.com')
    self.assertEqual(endpoint._port, expectedPort)
    self.assertIsInstance(endpoint, HostnameEndpoint)
