QueueEntry[] entries = new QueueEntry[PRIORITIES.length];
Map<String,Object> queueAttributes = new HashMap<String, Object>();
queueAttributes.put(Queue.ID, UUID.randomUUID());
queueAttributes.put(Queue.NAME, getName());
queueAttributes.put(PriorityQueue.PRIORITIES, 10);
final VirtualHostImpl virtualHost = mock(VirtualHostImpl.class);
when(virtualHost.getSecurityManager()).thenReturn(mock(SecurityManager.class));
when(virtualHost.getEventLogger()).thenReturn(new EventLogger());
ConfiguredObjectFactory factory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
when(virtualHost.getObjectFactory()).thenReturn(factory);
when(virtualHost.getModel()).thenReturn(factory.getModel());
when(virtualHost.getTaskExecutor()).thenReturn(CurrentThreadTaskExecutor.newStartedInstance());
PriorityQueueImpl queue = new PriorityQueueImpl(queueAttributes, virtualHost);
queue.open();
_list = queue.getEntries();
for (int i = 0; i < PRIORITIES.length; i++)