}
private int routeMessage(String routingKey, long messageNumber) throws AMQException
{
InboundMessage inboundMessage = mock(InboundMessage.class);
when(inboundMessage.getRoutingKey()).thenReturn(routingKey);
List<? extends BaseQueue> queues = _exchange.route(inboundMessage);
ServerMessage message = mock(ServerMessage.class);
MessageReference ref = mock(MessageReference.class);
when(ref.getMessage()).thenReturn(message);
when(message.newReference()).thenReturn(ref);