Program: 41708
Project: 41708
Buggy source:
private void doSendMessageOnConnectionWithBrokerDefinedPrefixPropertiesTestImpl(Class<? extends Destination> destType,String destPrefix,String destName,String destAddress,Byte destTypeAnnotationValue) throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(IntegrationTestFixture.PORT)){
    Map<Symbol,Object> properties=new HashMap<Symbol,Object>();
    properties.put(AmqpConnectionProperties.QUEUE_PREFIX,destPrefix);
    properties.put(AmqpConnectionProperties.TOPIC_PREFIX,destPrefix);
    Connection connection=testFixture.establishConnecton(testPeer,null,null,properties);
    connection.start();
    testPeer.expectBegin(true);
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    Destination dest=null;
    if (destType == Topic.class) {
      dest=session.createTopic(destName);
    }
 else     if (destType == Queue.class) {
      dest=session.createQueue(destName);
    }
 else {
      fail("String_Node_Str");
    }
    TargetMatcher targetMatcher=new TargetMatcher();
    targetMatcher.withAddress(equalTo(destAddress));
    testPeer.expectSenderAttach(targetMatcher,false,false);
    MessageProducer producer=session.createProducer(dest);
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true);
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpDestinationHelper.JMS_DEST_TYPE_MSG_ANNOTATION_SYMBOL_NAME),equalTo(destTypeAnnotationValue));
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpDestinationHelper.JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME),equalTo(destTypeAnnotationValue));
    MessagePropertiesSectionMatcher propsMatcher=new MessagePropertiesSectionMatcher(true);
    propsMatcher.withTo(equalTo(destAddress));
    propsMatcher.withReplyTo(equalTo(destAddress));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propsMatcher);
    testPeer.expectTransfer(messageMatcher);
    Message message=session.createMessage();
    message.setJMSReplyTo(dest);
    producer.send(message);
    testPeer.waitForAllHandlersToComplete(2000);
  }
 }

Fixed version (ground truth):
private void doSendMessageOnConnectionWithBrokerDefinedPrefixPropertiesTestImpl(Class<? extends Destination> destType,String destPrefix,String destName,String destAddress,Byte destTypeAnnotationValue) throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(testFixture.getAvailablePort())){
    Map<Symbol,Object> properties=new HashMap<Symbol,Object>();
    properties.put(AmqpConnectionProperties.QUEUE_PREFIX,destPrefix);
    properties.put(AmqpConnectionProperties.TOPIC_PREFIX,destPrefix);
    Connection connection=testFixture.establishConnecton(testPeer,null,null,properties);
    connection.start();
    testPeer.expectBegin(true);
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    Destination dest=null;
    if (destType == Topic.class) {
      dest=session.createTopic(destName);
    }
 else     if (destType == Queue.class) {
      dest=session.createQueue(destName);
    }
 else {
      fail("String_Node_Str");
    }
    TargetMatcher targetMatcher=new TargetMatcher();
    targetMatcher.withAddress(equalTo(destAddress));
    testPeer.expectSenderAttach(targetMatcher,false,false);
    MessageProducer producer=session.createProducer(dest);
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true);
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpDestinationHelper.JMS_DEST_TYPE_MSG_ANNOTATION_SYMBOL_NAME),equalTo(destTypeAnnotationValue));
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpDestinationHelper.JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME),equalTo(destTypeAnnotationValue));
    MessagePropertiesSectionMatcher propsMatcher=new MessagePropertiesSectionMatcher(true);
    propsMatcher.withTo(equalTo(destAddress));
    propsMatcher.withReplyTo(equalTo(destAddress));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propsMatcher);
    testPeer.expectTransfer(messageMatcher);
    Message message=session.createMessage();
    message.setJMSReplyTo(dest);
    producer.send(message);
    testPeer.waitForAllHandlersToComplete(2000);
  }
 }