Program: 41147
Project: 41147
Buggy source:
@Test(timeout=5000) public void testSendBasicBytesMessageWithContent() 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);
    Queue queue=session.createQueue("String_Node_Str");
    MessageProducer producer=session.createProducer(queue);
    byte[] content="String_Node_Str".getBytes();
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true).withDurable(equalTo(true));
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpMessageSupport.JMS_MSG_TYPE),equalTo(AmqpMessageSupport.JMS_BYTES_MESSAGE));
    MessagePropertiesSectionMatcher propertiesMatcher=new MessagePropertiesSectionMatcher(true);
    propertiesMatcher.withContentType(equalTo(Symbol.valueOf(AmqpMessageSupport.OCTET_STREAM_CONTENT_TYPE)));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propertiesMatcher);
    messageMatcher.setMessageContentMatcher(new EncodedDataMatcher(new Binary(content)));
    testPeer.expectTransfer(messageMatcher);
    BytesMessage message=session.createBytesMessage();
    message.writeBytes(content);
    producer.send(message);
  }
 }

Fixed version (ground truth):
@Test(timeout=5000) public void testSendBasicBytesMessageWithContent() 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);
    Queue queue=session.createQueue("String_Node_Str");
    MessageProducer producer=session.createProducer(queue);
    byte[] content="String_Node_Str".getBytes();
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true).withDurable(equalTo(true));
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpMessageSupport.JMS_MSG_TYPE),equalTo(AmqpMessageSupport.JMS_BYTES_MESSAGE));
    MessagePropertiesSectionMatcher propertiesMatcher=new MessagePropertiesSectionMatcher(true);
    propertiesMatcher.withContentType(equalTo(Symbol.valueOf(AmqpMessageSupport.OCTET_STREAM_CONTENT_TYPE)));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propertiesMatcher);
    messageMatcher.setMessageContentMatcher(new EncodedDataMatcher(new Binary(content)));
    testPeer.expectTransfer(messageMatcher);
    BytesMessage message=session.createBytesMessage();
    message.writeBytes(content);
    producer.send(message);
  }
 }