ARTEMIS-3346 test for typo fix
This commit is contained in:
parent
595d1e43c7
commit
a7089d0050
|
@ -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<String, Object> messageMap = clientMessage.toMap();
|
||||
Map<String, Object> 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"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue