Source:
public void performSingleQueueSendReceiveTestCase() throws AndesClientConfigurationException, JMSException, NamingException, IOException, AndesClientException, LoginAuthenticationExceptionException, URISyntaxException, LogoutAuthenticationExceptionException, XMLStreamException, AndesAdminServiceBrokerManagerAdminException, SAXException, TopicManagerAdminServiceEventAdminExceptionException, XPathExpressionException, UserAdminUserAdminException { long sendCount = 1000L; long expectedCount = 1000L; createQueueWithExclusiveConsumer("exlusiveQueue"); AndesJMSConsumerClientConfiguration consumerConfig = new AndesJMSConsumerClientConfiguration(ExchangeType.QUEUE, "exlusiveQueue"); consumerConfig.setPrintsPerMessageCount(expectedCount / 10L); AndesJMSPublisherClientConfiguration publisherConfig = new AndesJMSPublisherClientConfiguration(ExchangeType.QUEUE, "exlusiveQueue"); publisherConfig.setNumberOfMessagesToSend(sendCount); publisherConfig.setPrintsPerMessageCount(sendCount / 10L); AndesClient consumerClient1 = new AndesClient(consumerConfig, true); consumerClient1.startClient(); AndesClient consumerClient2 = new AndesClient(consumerConfig, true); consumerClient2.startClient(); AndesClient publisherClient = new AndesClient(publisherConfig, true); publisherClient.startClient(); AndesClientUtils.waitForMessagesAndShutdown(consumerClient1, AndesClientConstants.DEFAULT_RUN_TIME); AndesClientUtils.waitForMessagesAndShutdown(consumerClient2, AndesClientConstants.DEFAULT_RUN_TIME); Assert.assertEquals(publisherClient.getSentMessageCount(), sendCount, "Error in sending all the messages."); Assert.assertEquals(consumerClient1.getReceivedMessageCount(), expectedCount, "Error in sending all the messages to the exclusive consumer."); Assert.assertEquals(consumerClient2.getReceivedMessageCount(), 0, "Error in sending messages to non-exclusive consumer."); }

Target:
public void performSingleQueueSendReceiveTestCase() throws AndesClientConfigurationException, JMSException, NamingException, IOException, AndesClientException, LoginAuthenticationExceptionException, URISyntaxException, LogoutAuthenticationExceptionException, XMLStreamException, AndesAdminServiceBrokerManagerAdminException, SAXException, TopicManagerAdminServiceEventAdminExceptionException, XPathExpressionException, UserAdminUserAdminException { long sendCount = 1000L; long expectedCount = 1000L; createQueueWithExclusiveConsumer("exlusiveQueue"); AndesJMSConsumerClientConfiguration consumerConfig = new AndesJMSConsumerClientConfiguration(ExchangeType.QUEUE, "exlusiveQueue"); consumerConfig.setPrintsPerMessageCount(expectedCount / 10L); AndesJMSPublisherClientConfiguration publisherConfig = new AndesJMSPublisherClientConfiguration(ExchangeType.QUEUE, "exlusiveQueue"); publisherConfig.setNumberOfMessagesToSend(sendCount); publisherConfig.setPrintsPerMessageCount(sendCount / 10L); AndesClient consumerClient1 = new AndesClient(consumerConfig, true); consumerClient1.startClient(); AndesClient consumerClient2 = new AndesClient(consumerConfig, true); consumerClient2.startClient(); AndesClient publisherClient = new AndesClient(publisherConfig, true); publisherClient.startClient(); AndesClientUtils.waitForMessagesAndShutdown(consumerClient1, AndesClientConstants.DEFAULT_RUN_TIME); AndesClientUtils.waitForMessagesAndShutdown(consumerClient2, AndesClientConstants.DEFAULT_RUN_TIME); Assert.assertEquals(publisherClient.getSentMessageCount(), sendCount, "Error in sending all the messages."); Assert.assertEquals(consumerClient1.getReceivedMessageCount(), expectedCount, "Error in sending all the messages to the exclusive consumer."); Assert.assertEquals(consumerClient2.getReceivedMessageCount(), 0, "Non-exclusive subscriber isn't received messages"); }