@Test public void testJMS_AMQP_ACK_TYPEPropertExistsWhenSet() throws JMSException { JmsSession session = Mockito.mock(JmsSession.class); JmsAcknowledgeCallback callback = new JmsAcknowledgeCallback(session); callback.setAckType(RELEASED); JmsMessage message = Mockito.mock(JmsMapMessage.class); Mockito.when(message.getAcknowledgeCallback()).thenReturn(callback); assertTrue(JmsMessagePropertyIntercepter.propertyExists(message, JMS_AMQP_ACK_TYPE)); }
public static boolean propertyExists(JmsMessage message, String name) throws JMSException { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { return false; } PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { return jmsPropertyExpression.propertyExists(message); } else { return message.getFacade().propertyExists(name); } }
JmsMessagePropertyIntercepter { public static boolean propertyExists(JmsMessage message, String name) throws JMSException { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { return false; } PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { return jmsPropertyExpression.propertyExists(message); } else { return message.getFacade().propertyExists(name); } } }
JmsMessagePropertyIntercepter { public static boolean propertyExists(JmsMessage message, String name) throws JMSException { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { return false; } PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { return jmsPropertyExpression.propertyExists(message); } else { return message.getFacade().propertyExists(name); } }  }
JmsMessagePropertyIntercepter { public static boolean propertyExists(JmsMessage message, String name) throws JMSException { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { return false; } PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { return jmsPropertyExpression.propertyExists(message); } else { return message.getFacade().propertyExists(name); } }  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 boolean propertyExists(JmsMessage message, String name) throws JMSException { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { return false; } PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression != null) { return jmsPropertyExpression.propertyExists(message); } else { return message.getFacade().propertyExists(name); } }  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);  }