}
// Access the implementation of the test queue and move the last message
// to another queue. Verify that the move occurred within the limits of
// the test.
Queue queue = (Queue) broker.getRegionBroker().getDestinationMap().get(
destination);
ConnectionContext context = new ConnectionContext(
new NonCachedMessageEvaluationContext());
context.setBroker(broker.getBroker());
context.getMessageEvaluationContext().setDestination(destination);
long startTimeMillis = System.currentTimeMillis();
Assert.assertEquals(1, queue
.moveMatchingMessagesTo(context, "id=" + (QUEUE_SIZE - 1),
createDestination(MOVE_TO_DESTINATION_NAME)));
long durationMillis = System.currentTimeMillis() - startTimeMillis;