private int routeMessage(String routingKey, long messageNumber)
{
ServerMessage message = mock(ServerMessage.class);
when(message.getInitialRoutingAddress()).thenReturn(routingKey);
List<? extends BaseQueue> queues = _exchange.route(message, routingKey, InstanceProperties.EMPTY);
MessageReference ref = mock(MessageReference.class);
when(ref.getMessage()).thenReturn(message);
when(message.newReference()).thenReturn(ref);
when(message.getMessageNumber()).thenReturn(messageNumber);
for(BaseQueue q : queues)
{
q.enqueue(message, null);