public void testProtocolIsExpectedBasedOnTestProfile() throws Exception
{
super.setUp();
final AMQConnection connection = (AMQConnection) getConnection();
final Protocol expectedBrokerProtocol = getBrokerProtocol();
final AMQPProtocolVersionWrapper amqpProtocolVersionWrapper = new AMQPProtocolVersionWrapper(expectedBrokerProtocol);
final ProtocolVersion protocolVersion = connection.getProtocolVersion();
assertTrue("Connection AMQP protocol " + expectedBrokerProtocol + "is not the same as the test specified protocol " + protocolVersion,
areEquivalent(amqpProtocolVersionWrapper, protocolVersion));
connection.close();
}