@Test public void testGetJMSCorrelationIdWhenSet() throws JMSException { JmsMessageFacade facade = Mockito.mock(JmsMessageFacade.class); JmsMessage message = Mockito.mock(JmsMapMessage.class); Mockito.when(message.getFacade()).thenReturn(facade); Mockito.when(facade.getCorrelationId()).thenReturn("MESSAGE_ID"); assertEquals("MESSAGE_ID", JmsMessagePropertyIntercepter.getProperty(message, JMS_CORRELATIONID)); }
public static Object getProperty(JmsMessage message, String name) throws JMSException { Object value = null; checkPropertyNameIsValid(name, message.isValidatePropertyNames()); PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { value = jmsPropertyExpression.getProperty(message); } else { value = message.getFacade().getProperty(name); } return value; }
JmsMessagePropertyIntercepter { public static Object getProperty(JmsMessage message, String name) throws JMSException { Object value = null; checkPropertyNameIsValid(name, message.isValidatePropertyNames()); PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { value = jmsPropertyExpression.getProperty(message); } else { value = message.getFacade().getProperty(name); } return value; } }
JmsMessagePropertyIntercepter { public static Object getProperty(JmsMessage message, String name) throws JMSException { Object value = null; checkPropertyNameIsValid(name, message.isValidatePropertyNames()); PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { value = jmsPropertyExpression.getProperty(message); } else { value = message.getFacade().getProperty(name); } return value; }  }
JmsMessagePropertyIntercepter { public static Object getProperty(JmsMessage message, String name) throws JMSException { Object value = null; checkPropertyNameIsValid(name, message.isValidatePropertyNames()); PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { value = jmsPropertyExpression.getProperty(message); } else { value = message.getFacade().getProperty(name); } return value; }  static Object getProperty(JmsMessage message, String name); static void setProperty(JmsMessage message, String name, Object value); static boolean propertyExists(JmsMessage message, String name); static void clearProperties(JmsMessage message, boolean excludeStandardJMSHeaders); static Set<String> getAllPropertyNames(JmsMessage message); static Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders); }
JmsMessagePropertyIntercepter { public static Object getProperty(JmsMessage message, String name) throws JMSException { Object value = null; checkPropertyNameIsValid(name, message.isValidatePropertyNames()); PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { value = jmsPropertyExpression.getProperty(message); } else { value = message.getFacade().getProperty(name); } return value; }  static Object getProperty(JmsMessage message, String name); static void setProperty(JmsMessage message, String name, Object value); static boolean propertyExists(JmsMessage message, String name); static void clearProperties(JmsMessage message, boolean excludeStandardJMSHeaders); static Set<String> getAllPropertyNames(JmsMessage message); static Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders);  }