}
public void testCreateQueueWithAlertingThresholdsSet() throws Exception
{
final String queueName = getName();
final ManagedBroker managedBroker = _jmxUtils.getManagedBroker(VIRTUAL_HOST);
final Long maximumMessageCount = 100l;
final Long maximumMessageSize = 200l;
final Long maximumQueueDepth = 300l;
final Long maximumMessageAge = 400l;
final Map<String, Object> arguments = new HashMap<String, Object>();
arguments.put(QueueArgumentsConverter.X_QPID_MAXIMUM_MESSAGE_COUNT, maximumMessageCount);
arguments.put(QueueArgumentsConverter.X_QPID_MAXIMUM_MESSAGE_SIZE, maximumMessageSize);
arguments.put(QueueArgumentsConverter.X_QPID_MAXIMUM_QUEUE_DEPTH, maximumQueueDepth);
arguments.put(QueueArgumentsConverter.X_QPID_MAXIMUM_MESSAGE_AGE, maximumMessageAge);
managedBroker.createNewQueue(queueName, null, true, arguments);
// Ensure the queue exists
assertNotNull("Queue object name expected to exist", _jmxUtils.getQueueObjectName(VIRTUAL_HOST, queueName));
assertNotNull("Manager queue expected to be available", _jmxUtils.getManagedQueue(queueName));