List of usage examples for javax.jms TextMessage getPropertyNames
Enumeration getPropertyNames() throws JMSException;
From source file:org.mule.transport.jms.JmsMuleMessageFactoryTestCase.java
@Override protected Object getValidTransportMessage() throws Exception { TextMessage textMessage = mock(TextMessage.class); when(textMessage.getText()).thenReturn(MESSAGE_TEXT); when(textMessage.getJMSCorrelationID()).thenReturn(null); when(textMessage.getJMSDeliveryMode()).thenReturn(Integer.valueOf(1)); when(textMessage.getJMSDestination()).thenReturn(null); when(textMessage.getJMSExpiration()).thenReturn(Long.valueOf(0)); when(textMessage.getJMSMessageID()).thenReturn("1234567890"); when(textMessage.getJMSPriority()).thenReturn(Integer.valueOf(4)); when(textMessage.getJMSRedelivered()).thenReturn(Boolean.FALSE); when(textMessage.getJMSReplyTo()).thenReturn(null); when(textMessage.getJMSTimestamp()).thenReturn(Long.valueOf(0)); when(textMessage.getJMSType()).thenReturn(null); when(textMessage.getPropertyNames()) .thenReturn(IteratorUtils.asEnumeration(IteratorUtils.arrayIterator(new Object[] { "foo" }))); when(textMessage.getObjectProperty("foo")).thenReturn("bar"); return textMessage; }