}
private void assertBindingRecord(List<BindingRecord> queueBindings, String queueName, String exchangeName,
String routingKey, String selectorKey)
{
BindingRecord record = null;
for (BindingRecord bindingRecord : queueBindings)
{
if (bindingRecord.getQueueName().asString().equals(queueName)
&& bindingRecord.getExchangeName().asString().equals(exchangeName))
{
record = bindingRecord;
break;
}
}
assertNotNull("Binding is not found for queue " + queueName + " and exchange " + exchangeName, record);
assertEquals("Unexpected routing key", routingKey, record.getRoutingKey().asString());
if (selectorKey != null)
{
assertEquals("Unexpected selector key for " + queueName, selectorKey,
record.getArguments().get(AMQPFilterTypes.JMS_SELECTOR.getValue()));
}
}