@Test public void testCorrelationIdAdaptrisMessage_ToMessage() throws Exception { EmbeddedActiveMq broker = new EmbeddedActiveMq(); JmsConnection conn = broker.getJmsConnection(); try { broker.start(); LifecycleHelper.initAndStart(conn, false); Session session = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); AdaptrisMessage adpMsg = AdaptrisMessageFactory.getDefaultInstance().newMessage("hello"); TextMessage jmsMsg = session.createTextMessage(); MessageIdCorrelationIdSource cs = new MessageIdCorrelationIdSource(); cs.processCorrelationId(adpMsg, jmsMsg); assertEquals(adpMsg.getUniqueId(), jmsMsg.getJMSCorrelationID()); session.close(); } finally { LifecycleHelper.stopAndClose(conn, false); broker.destroy(); } }
@Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); }
MessageIdCorrelationIdSource implements CorrelationIdSource { @Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); } }
MessageIdCorrelationIdSource implements CorrelationIdSource { @Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); }  }
MessageIdCorrelationIdSource implements CorrelationIdSource { @Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); }  @Override void processCorrelationId(AdaptrisMessage src, Message dest); @Override void processCorrelationId(Message src, AdaptrisMessage dest); }
MessageIdCorrelationIdSource implements CorrelationIdSource { @Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); }  @Override void processCorrelationId(AdaptrisMessage src, Message dest); @Override void processCorrelationId(Message src, AdaptrisMessage dest);  }