public void testBindQueue() throws Exception
{
ExchangeImpl<?> exchange = createTestExchange();
AMQQueue queue = createTestQueue(QUEUE_NAME, "queueOwner", false, null);
BindingImpl binding = createBinding(UUIDGenerator.generateRandomUUID(), ROUTING_KEY, queue,
exchange, _bindingArgs);
_configStore.create(exchange.asObjectRecord());
_configStore.create(queue.asObjectRecord());
_configStore.create(binding.asObjectRecord());
reopenStore();
_configStore.visitConfiguredObjectRecords(_handler);
Map<String,Object> map = new HashMap<String, Object>();
map.put(Binding.NAME, ROUTING_KEY);
map.put(Binding.ARGUMENTS,_bindingArgs);
map.put(Binding.DURABLE,true);
map.put(Binding.TYPE, Binding.class.getSimpleName());
Map<String,UUID> parents = new HashMap<String, UUID>();
parents.put(Exchange.class.getSimpleName(), exchange.getId());
parents.put(Queue.class.getSimpleName(), queue.getId());
verify(_handler).handle(matchesRecord(binding.getId(), BINDING, map, parents));
}