'Test the C{haproxy} enpdoint prefix against one sub-endpoint type.
@param description: A string endpoint description beginning with
C{haproxy}.
@type description: native L{str}
@param expectedClass: the expected sub-endpoint class given the
description.
@type expectedClass: L{type}
@return: the parsed endpoint
@rtype: L{IStreamServerEndpoint}
@raise twisted.trial.unittest.Failtest: if the parsed endpoint doesn\'t
match expectations.'

def onePrefix(self, description, expectedClass):

    reactor = MemoryReactor()
    endpoint = serverFromString(reactor, description)
    self.assertIsInstance(endpoint, _WrapperServerEndpoint)
    self.assertIsInstance(endpoint._wrappedEndpoint, expectedClass)
    self.assertIs(endpoint._wrapperFactory, HAProxyWrappingFactory)
    return endpoint
