@Test public void testGetGreeting() { try { unidentifiedProducer.sendName("helloworld.q", "John", "Doe"); String greeting = consumer.getGreeting(1000); assertEquals("Hello John Doe!", greeting); } catch (JMSException e) { fail("a JMS Exception occurred"); } }
public void sendName(String destinationName, String firstName, String lastName) throws JMSException { String text = firstName + " " + lastName; TextMessage textMessage = session.createTextMessage(text); Destination destination = session.createQueue(destinationName); messageProducer.send(destination, textMessage); LOGGER.debug("unidentifiedProducer sent message with text='{}'", text); }
UnidentifiedProducer { public void sendName(String destinationName, String firstName, String lastName) throws JMSException { String text = firstName + " " + lastName; TextMessage textMessage = session.createTextMessage(text); Destination destination = session.createQueue(destinationName); messageProducer.send(destination, textMessage); LOGGER.debug("unidentifiedProducer sent message with text='{}'", text); } }
UnidentifiedProducer { public void sendName(String destinationName, String firstName, String lastName) throws JMSException { String text = firstName + " " + lastName; TextMessage textMessage = session.createTextMessage(text); Destination destination = session.createQueue(destinationName); messageProducer.send(destination, textMessage); LOGGER.debug("unidentifiedProducer sent message with text='{}'", text); }  }
UnidentifiedProducer { public void sendName(String destinationName, String firstName, String lastName) throws JMSException { String text = firstName + " " + lastName; TextMessage textMessage = session.createTextMessage(text); Destination destination = session.createQueue(destinationName); messageProducer.send(destination, textMessage); LOGGER.debug("unidentifiedProducer sent message with text='{}'", text); }  void create(); void close(); void sendName(String destinationName, String firstName,
            String lastName); }
UnidentifiedProducer { public void sendName(String destinationName, String firstName, String lastName) throws JMSException { String text = firstName + " " + lastName; TextMessage textMessage = session.createTextMessage(text); Destination destination = session.createQueue(destinationName); messageProducer.send(destination, textMessage); LOGGER.debug("unidentifiedProducer sent message with text='{}'", text); }  void create(); void close(); void sendName(String destinationName, String firstName,
            String lastName);  }