Program: 41707
Project: 41707
Buggy source:
@Test(timeout=2000) public void testSendMessageWithApplicationProperties() 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";
    Queue queue=session.createQueue(queueName);
    MessageProducer producer=session.createProducer(queue);
    ApplicationPropertiesSectionMatcher appPropsMatcher=new ApplicationPropertiesSectionMatcher(true);
    appPropsMatcher.withEntry(NULL_STRING_PROP,nullValue());
    appPropsMatcher.withEntry(STRING_PROP,equalTo(STRING_PROP_VALUE));
    appPropsMatcher.withEntry(BOOLEAN_PROP,equalTo(BOOLEAN_PROP_VALUE));
    appPropsMatcher.withEntry(BYTE_PROP,equalTo(BYTE_PROP_VALUE));
    appPropsMatcher.withEntry(SHORT_PROP,equalTo(SHORT_PROP_VALUE));
    appPropsMatcher.withEntry(INT_PROP,equalTo(INT_PROP_VALUE));
    appPropsMatcher.withEntry(LONG_PROP,equalTo(LONG_PROP_VALUE));
    appPropsMatcher.withEntry(FLOAT_PROP,equalTo(FLOAT_PROP_VALUE));
    appPropsMatcher.withEntry(DOUBLE_PROP,equalTo(DOUBLE_PROP_VALUE));
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true).withDurable(equalTo(true));
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    MessagePropertiesSectionMatcher propsMatcher=new MessagePropertiesSectionMatcher(true).withTo(equalTo(queueName));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propsMatcher);
    messageMatcher.setApplicationPropertiesMatcher(appPropsMatcher);
    testPeer.expectTransfer(messageMatcher);
    Message message=session.createMessage();
    message.setStringProperty(NULL_STRING_PROP,NULL_STRING_PROP_VALUE);
    message.setStringProperty(STRING_PROP,STRING_PROP_VALUE);
    message.setBooleanProperty(BOOLEAN_PROP,BOOLEAN_PROP_VALUE);
    message.setByteProperty(BYTE_PROP,BYTE_PROP_VALUE);
    message.setShortProperty(SHORT_PROP,SHORT_PROP_VALUE);
    message.setIntProperty(INT_PROP,INT_PROP_VALUE);
    message.setLongProperty(LONG_PROP,LONG_PROP_VALUE);
    message.setFloatProperty(FLOAT_PROP,FLOAT_PROP_VALUE);
    message.setDoubleProperty(DOUBLE_PROP,DOUBLE_PROP_VALUE);
    producer.send(message);
    testPeer.waitForAllHandlersToComplete(1000);
  }
 }

Fixed version (ground truth):
@Test(timeout=2000) public void testSendMessageWithApplicationProperties() 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";
    Queue queue=session.createQueue(queueName);
    MessageProducer producer=session.createProducer(queue);
    ApplicationPropertiesSectionMatcher appPropsMatcher=new ApplicationPropertiesSectionMatcher(true);
    appPropsMatcher.withEntry(NULL_STRING_PROP,nullValue());
    appPropsMatcher.withEntry(STRING_PROP,equalTo(STRING_PROP_VALUE));
    appPropsMatcher.withEntry(BOOLEAN_PROP,equalTo(BOOLEAN_PROP_VALUE));
    appPropsMatcher.withEntry(BYTE_PROP,equalTo(BYTE_PROP_VALUE));
    appPropsMatcher.withEntry(SHORT_PROP,equalTo(SHORT_PROP_VALUE));
    appPropsMatcher.withEntry(INT_PROP,equalTo(INT_PROP_VALUE));
    appPropsMatcher.withEntry(LONG_PROP,equalTo(LONG_PROP_VALUE));
    appPropsMatcher.withEntry(FLOAT_PROP,equalTo(FLOAT_PROP_VALUE));
    appPropsMatcher.withEntry(DOUBLE_PROP,equalTo(DOUBLE_PROP_VALUE));
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true).withDurable(equalTo(true));
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    MessagePropertiesSectionMatcher propsMatcher=new MessagePropertiesSectionMatcher(true).withTo(equalTo(queueName));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propsMatcher);
    messageMatcher.setApplicationPropertiesMatcher(appPropsMatcher);
    testPeer.expectTransfer(messageMatcher);
    Message message=session.createMessage();
    message.setStringProperty(NULL_STRING_PROP,NULL_STRING_PROP_VALUE);
    message.setStringProperty(STRING_PROP,STRING_PROP_VALUE);
    message.setBooleanProperty(BOOLEAN_PROP,BOOLEAN_PROP_VALUE);
    message.setByteProperty(BYTE_PROP,BYTE_PROP_VALUE);
    message.setShortProperty(SHORT_PROP,SHORT_PROP_VALUE);
    message.setIntProperty(INT_PROP,INT_PROP_VALUE);
    message.setLongProperty(LONG_PROP,LONG_PROP_VALUE);
    message.setFloatProperty(FLOAT_PROP,FLOAT_PROP_VALUE);
    message.setDoubleProperty(DOUBLE_PROP,DOUBLE_PROP_VALUE);
    producer.send(message);
    testPeer.waitForAllHandlersToComplete(1000);
  }
 }