### Question:
AmqpJmsMessagePropertyIntercepter { public static Set<String> getPropertyNames(AmqpJmsMessageFacade message) { Set<String> names = new HashSet<String>(); for (Entry<String, PropertyIntercepter> entry : PROPERTY_INTERCEPTERS.entrySet()) { if (entry.getValue().propertyExists(message)) { names.add(entry.getKey()); } } return message.getApplicationPropertyNames(names); }  static Object getProperty(AmqpJmsMessageFacade message, String name); static void setProperty(AmqpJmsMessageFacade message, String name, Object value); static boolean propertyExists(AmqpJmsMessageFacade message, String name); static Set<String> getAllPropertyNames(); static Set<String> getPropertyNames(AmqpJmsMessageFacade message); static void clearProperties(AmqpJmsMessageFacade message);  }### Answer:
@Test public void testJmsAmqpTtlInPropertyNamesWhenSet() throws JMSException { AmqpJmsMessageFacade message = createAmqpMessageFacade(); Mockito.when(message.hasAmqpTimeToLiveOverride()).thenReturn(true); Mockito.when(message.getAmqpTimeToLiveOverride()).thenReturn(65536L); Mockito.when(message.getApplicationPropertyNames(anySet())).then(new PassPropertyNames()); assertTrue(AmqpJmsMessagePropertyIntercepter.getPropertyNames(message).contains(JMS_AMQP_TTL)); }
@Test public void testJmsAmqpReplyToGroupIdInPropertyNamesWhenSet() throws JMSException { String testValue = "ReplyToGroupId"; AmqpJmsMessageFacade message = createAmqpMessageFacade(); Mockito.when(message.getApplicationPropertyNames(anySet())).then(new PassPropertyNames()); Mockito.when(message.getReplyToGroupId()).thenReturn(testValue); assertTrue(AmqpJmsMessagePropertyIntercepter.getPropertyNames(message).contains(JMS_AMQP_REPLY_TO_GROUP_ID)); }
@Test public void testJmsAmqpTypedEncodingNotInPropertyNamesWhenNotSet() throws JMSException { AmqpJmsObjectMessageFacade message = createAmqpObjectMessageFacade(); Mockito.when(message.isAmqpTypedEncoding()).thenReturn(false); assertFalse(AmqpJmsMessagePropertyIntercepter.getPropertyNames(message).contains(JMS_AMQP_TYPED_ENCODING)); }
@Test public void testJmsAmqpTypedEncodingInPropertyNamesWhenSet() throws JMSException { AmqpJmsObjectMessageFacade message = createAmqpObjectMessageFacade(); Mockito.when(message.isAmqpTypedEncoding()).thenReturn(true); assertTrue(AmqpJmsMessagePropertyIntercepter.getPropertyNames(message).contains(JMS_AMQP_TYPED_ENCODING)); }