diff --git a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/jms/client/ConversionTest.java b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/jms/client/ConversionTest.java index 541e0cc3f1..b169172a0d 100644 --- a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/jms/client/ConversionTest.java +++ b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/jms/client/ConversionTest.java @@ -18,12 +18,15 @@ package org.apache.activemq.artemis.jms.client; import org.apache.activemq.artemis.api.core.ICoreMessage; import org.apache.activemq.artemis.core.client.impl.ClientMessageImpl; +import org.apache.activemq.artemis.utils.UUID; +import org.apache.activemq.artemis.utils.UUIDGenerator; import org.junit.Test; import java.util.Map; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertNotNull; /** * Test conversion from Core message to JMS message. @@ -32,15 +35,19 @@ public class ConversionTest { @Test public void testCoreToJMSConversion() { + UUID uuid = UUIDGenerator.getInstance().generateUUID(); ICoreMessage clientMessage = new ClientMessageImpl(); clientMessage.setDurable(true) .setPriority((byte) 9) - .setExpiration(123456); + .setExpiration(123456) + .setUserID(uuid); Map messageMap = clientMessage.toMap(); Map jmsMap = ActiveMQMessage.coreMaptoJMSMap(messageMap); Object priority = jmsMap.get("JMSPriority"); assertTrue(priority instanceof Integer); assertEquals(9, priority); + assertNotNull(jmsMap.get("JMSMessageID")); + assertEquals("ID:" + uuid, jmsMap.get("JMSMessageID")); } }