Program: 41714
Project: 41714
Buggy source:
/** 
 * Tests that the   {@link AmqpDestinationHelper#JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME} is set as a byte ona sent message to indicate its 'reply-to' address represents a Topic JMSDestination.
 */
@Test(timeout=5000) public void testSentMessageContainsReplyToTypeAnnotationByte() throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(IntegrationTestFixture.PORT)){
    Connection connection=testFixture.establishConnecton(testPeer);
    testPeer.expectBegin(true);
    testPeer.expectSenderAttach();
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    String queueName="String_Node_Str";
    String replyTopicName="String_Node_Str";
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true).withDurable(equalTo(true));
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    Symbol annotationKey=AmqpMessageSupport.getSymbol(AmqpDestinationHelper.JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME);
    msgAnnotationsMatcher.withEntry(annotationKey,equalTo(AmqpDestinationHelper.TOPIC_TYPE));
    MessagePropertiesSectionMatcher propsMatcher=new MessagePropertiesSectionMatcher(true).withReplyTo(equalTo(replyTopicName));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propsMatcher);
    testPeer.expectTransfer(messageMatcher);
    Topic replyTopic=session.createTopic(replyTopicName);
    Message message=session.createMessage();
    message.setJMSReplyTo(replyTopic);
    Queue queue=session.createQueue(queueName);
    MessageProducer producer=session.createProducer(queue);
    producer.send(message);
    testPeer.waitForAllHandlersToComplete(2000);
  }
 }

Fixed version (ground truth):
/** 
 * Tests that the   {@link AmqpDestinationHelper#JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME} is set as a byte ona sent message to indicate its 'reply-to' address represents a Topic JMSDestination.
 */
@Test(timeout=5000) public void testSentMessageContainsReplyToTypeAnnotationByte() throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(testFixture.getAvailablePort())){
    Connection connection=testFixture.establishConnecton(testPeer);
    testPeer.expectBegin(true);
    testPeer.expectSenderAttach();
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    String queueName="String_Node_Str";
    String replyTopicName="String_Node_Str";
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true).withDurable(equalTo(true));
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    Symbol annotationKey=AmqpMessageSupport.getSymbol(AmqpDestinationHelper.JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME);
    msgAnnotationsMatcher.withEntry(annotationKey,equalTo(AmqpDestinationHelper.TOPIC_TYPE));
    MessagePropertiesSectionMatcher propsMatcher=new MessagePropertiesSectionMatcher(true).withReplyTo(equalTo(replyTopicName));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propsMatcher);
    testPeer.expectTransfer(messageMatcher);
    Topic replyTopic=session.createTopic(replyTopicName);
    Message message=session.createMessage();
    message.setJMSReplyTo(replyTopic);
    Queue queue=session.createQueue(queueName);
    MessageProducer producer=session.createProducer(queue);
    producer.send(message);
    testPeer.waitForAllHandlersToComplete(2000);
  }
 }