createProducerAndSendMessages(NUM_TO_SEND);
QueueViewMBean proxy = getProxyToQueueViewMBean();
createConsumer();
long start = System.currentTimeMillis();
LOG.info("purging..");
proxy.purge();
LOG.info("purge done: " + (System.currentTimeMillis() - start) + "ms");
assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
proxy.getQueueSize());
assertEquals("usage goes to duck", 0, proxy.getMemoryPercentUsage());
Message msg;