Source:
<code>private void createPublishAndSubscribeFromUser(String userKey, String destinationName) throws XPathExpressionException, AndesClientConfigurationException, IOException, JMSException, AndesClientException, NamingException { long sendCount = 10L; long expectedCount = 10L; AutomationContext userAutomationContext = new AutomationContext("MB", "mb001", FrameworkConstants.SUPER_TENANT_KEY, userKey); User contextUser = userAutomationContext.getContextTenant().getContextUser(); AndesJMSConsumerClientConfiguration consumerConfig = new AndesJMSConsumerClientConfiguration(contextUser .getUserNameWithoutDomain(), contextUser <START> .getPassword(), "127.0.0.1", 5672, ExchangeType.TOPIC, destinationName); <END> consumerConfig.setMaximumMessagesToReceived(expectedCount); AndesJMSPublisherClientConfiguration publisherConfig = new AndesJMSPublisherClientConfiguration(contextUser .getUserNameWithoutDomain(), contextUser .getPassword(), "127.0.0.1", 5672, ExchangeType.TOPIC, destinationName); publisherConfig.setNumberOfMessagesToSend(sendCount); AndesClient consumerClient = new AndesClient(consumerConfig, true); consumerClient.startClient(); AndesClient publisherClient = new AndesClient(publisherConfig, true); publisherClient.startClient(); AndesClientUtils .waitForMessagesAndShutdown(consumerClient, AndesClientConstants.DEFAULT_RUN_TIME); Assert.assertEquals(publisherClient .getSentMessageCount(), sendCount, "Message sending failed for user : " + contextUser .getUserNameWithoutDomain()); Assert.assertEquals(consumerClient .getReceivedMessageCount(), expectedCount, "Message receiving failed for user : " + contextUser .getUserNameWithoutDomain()); }</code><technical_language>more define host/port constants</technical_language>

Target:
private void createPublishAndSubscribeFromUser(String userKey, String destinationName) throws XPathExpressionException, AndesClientConfigurationException, IOException, JMSException, AndesClientException, NamingException { long sendCount = 10L; long expectedCount = 10L; AutomationContext userAutomationContext = new AutomationContext("MB", "mb001", FrameworkConstants.SUPER_TENANT_KEY, userKey); User contextUser = userAutomationContext.getContextTenant().getContextUser(); AndesJMSConsumerClientConfiguration consumerConfig = new AndesJMSConsumerClientConfiguration( contextUser.getUserNameWithoutDomain(), contextUser.getPassword(), ExchangeType.TOPIC, destinationName); consumerConfig.setMaximumMessagesToReceived(expectedCount); AndesJMSPublisherClientConfiguration publisherConfig = new AndesJMSPublisherClientConfiguration( contextUser.getUserNameWithoutDomain(), contextUser.getPassword(), ExchangeType.TOPIC, destinationName); publisherConfig.setNumberOfMessagesToSend(sendCount); AndesClient consumerClient = new AndesClient(consumerConfig, true); consumerClient.startClient(); AndesClient publisherClient = new AndesClient(publisherConfig, true); publisherClient.startClient(); AndesClientUtils .waitForMessagesAndShutdown(consumerClient, AndesClientConstants.DEFAULT_RUN_TIME); Assert.assertEquals(publisherClient.getSentMessageCount(), sendCount, "Message sending " + "failed for user : " + contextUser.getUserNameWithoutDomain()); Assert.assertEquals(consumerClient.getReceivedMessageCount(), expectedCount, "Message " + "receiving failed for user : " + contextUser.getUserNameWithoutDomain()); }