ActiveMQDestination amqDest = (ActiveMQDestination)destination;
ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq:Type=" +
(amqDest.isTopic() ? "Topic" : "Queue") +",Destination="
+ amqDest.getPhysicalName() + ",BrokerName=localhost");
QueueViewMBean queue = (QueueViewMBean) broker.getManagementContext().newProxyInstance(queueViewMBeanName, QueueViewMBean.class, true);
ObjectName slowConsumerPolicyMBeanName = queue.getSlowConsumerStrategy();
assertNotNull(slowConsumerPolicyMBeanName);
AbortSlowConsumerStrategyViewMBean abortPolicy = (AbortSlowConsumerStrategyViewMBean)
broker.getManagementContext().newProxyInstance(slowConsumerPolicyMBeanName, AbortSlowConsumerStrategyViewMBean.class, true);