Program: 41156
Project: 41156
Buggy source:
@Test(timeout=5000) public void testSendBasicMapMessage() 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);
    String myBoolKey="String_Node_Str";
    boolean myBool=true;
    String myByteKey="String_Node_Str";
    byte myByte=4;
    String myBytesKey="String_Node_Str";
    byte[] myBytes=myBytesKey.getBytes();
    String myCharKey="String_Node_Str";
    char myChar='d';
    String myDoubleKey="String_Node_Str";
    double myDouble=1234567890123456789.1234;
    String myFloatKey="String_Node_Str";
    float myFloat=1.1F;
    String myIntKey="String_Node_Str";
    int myInt=Integer.MAX_VALUE;
    String myLongKey="String_Node_Str";
    long myLong=Long.MAX_VALUE;
    String myShortKey="String_Node_Str";
    short myShort=25;
    String myStringKey="String_Node_Str";
    String myString=myStringKey;
    MapMessage mapMessage=session.createMapMessage();
    mapMessage.setBoolean(myBoolKey,myBool);
    mapMessage.setByte(myByteKey,myByte);
    mapMessage.setBytes(myBytesKey,myBytes);
    mapMessage.setChar(myCharKey,myChar);
    mapMessage.setDouble(myDoubleKey,myDouble);
    mapMessage.setFloat(myFloatKey,myFloat);
    mapMessage.setInt(myIntKey,myInt);
    mapMessage.setLong(myLongKey,myLong);
    mapMessage.setShort(myShortKey,myShort);
    mapMessage.setString(myStringKey,myString);
    Map<String,Object> map=new LinkedHashMap<String,Object>();
    map.put(myBoolKey,myBool);
    map.put(myByteKey,myByte);
    map.put(myBytesKey,new Binary(myBytes));
    map.put(myCharKey,(int)myChar);
    map.put(myDoubleKey,myDouble);
    map.put(myFloatKey,myFloat);
    map.put(myIntKey,myInt);
    map.put(myLongKey,myLong);
    map.put(myShortKey,myShort);
    map.put(myStringKey,myString);
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true).withDurable(equalTo(true));
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpMessageSupport.JMS_MSG_TYPE),equalTo(AmqpMessageSupport.JMS_MAP_MESSAGE));
    MessagePropertiesSectionMatcher propertiesMatcher=new MessagePropertiesSectionMatcher(true);
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propertiesMatcher);
    messageMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(map));
    testPeer.expectTransfer(messageMatcher);
    producer.send(mapMessage);
  }
 }

Fixed version (ground truth):
@Test(timeout=5000) public void testSendBasicMapMessage() 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);
    String myBoolKey="String_Node_Str";
    boolean myBool=true;
    String myByteKey="String_Node_Str";
    byte myByte=4;
    String myBytesKey="String_Node_Str";
    byte[] myBytes=myBytesKey.getBytes();
    String myCharKey="String_Node_Str";
    char myChar='d';
    String myDoubleKey="String_Node_Str";
    double myDouble=1234567890123456789.1234;
    String myFloatKey="String_Node_Str";
    float myFloat=1.1F;
    String myIntKey="String_Node_Str";
    int myInt=Integer.MAX_VALUE;
    String myLongKey="String_Node_Str";
    long myLong=Long.MAX_VALUE;
    String myShortKey="String_Node_Str";
    short myShort=25;
    String myStringKey="String_Node_Str";
    String myString=myStringKey;
    MapMessage mapMessage=session.createMapMessage();
    mapMessage.setBoolean(myBoolKey,myBool);
    mapMessage.setByte(myByteKey,myByte);
    mapMessage.setBytes(myBytesKey,myBytes);
    mapMessage.setChar(myCharKey,myChar);
    mapMessage.setDouble(myDoubleKey,myDouble);
    mapMessage.setFloat(myFloatKey,myFloat);
    mapMessage.setInt(myIntKey,myInt);
    mapMessage.setLong(myLongKey,myLong);
    mapMessage.setShort(myShortKey,myShort);
    mapMessage.setString(myStringKey,myString);
    Map<String,Object> map=new LinkedHashMap<String,Object>();
    map.put(myBoolKey,myBool);
    map.put(myByteKey,myByte);
    map.put(myBytesKey,new Binary(myBytes));
    map.put(myCharKey,(int)myChar);
    map.put(myDoubleKey,myDouble);
    map.put(myFloatKey,myFloat);
    map.put(myIntKey,myInt);
    map.put(myLongKey,myLong);
    map.put(myShortKey,myShort);
    map.put(myStringKey,myString);
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true).withDurable(equalTo(true));
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpMessageSupport.JMS_MSG_TYPE),equalTo(AmqpMessageSupport.JMS_MAP_MESSAGE));
    MessagePropertiesSectionMatcher propertiesMatcher=new MessagePropertiesSectionMatcher(true);
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propertiesMatcher);
    messageMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(map));
    testPeer.expectTransfer(messageMatcher);
    producer.send(mapMessage);
  }
 }