Search in sources :

Example 16 with MapToJmsMapMessage

use of org.apache.qpid.server.typedmessage.mimecontentconverter.MapToJmsMapMessage in project qpid-broker-j by apache.

the class MessageConverter_Internal_to_0_8Test method testMapMessageWithMimeType.

public void testMapMessageWithMimeType() throws Exception {
    HashMap<Object, Object> content = new HashMap<>();
    content.put("key1", 37);
    content.put("key2", "foo");
    final String mimeType = "foo/bar";
    final MapToJmsMapMessage mapToJmsMapMessage = new MapToJmsMapMessage();
    final byte[] expectedContent = mapToJmsMapMessage.toMimeContent(content);
    doTest(content, mimeType, expectedContent, mapToJmsMapMessage.getMimeType());
}
Also used : MapToJmsMapMessage(org.apache.qpid.server.typedmessage.mimecontentconverter.MapToJmsMapMessage) HashMap(java.util.HashMap)

Aggregations

MapToJmsMapMessage (org.apache.qpid.server.typedmessage.mimecontentconverter.MapToJmsMapMessage)16 QpidByteBuffer (org.apache.qpid.server.bytebuffer.QpidByteBuffer)12 NamedAddressSpace (org.apache.qpid.server.model.NamedAddressSpace)12 Message_1_0 (org.apache.qpid.server.protocol.v1_0.Message_1_0)12 ApplicationProperties (org.apache.qpid.server.protocol.v1_0.type.messaging.ApplicationProperties)8 Properties (org.apache.qpid.server.protocol.v1_0.type.messaging.Properties)8 MessageTransferMessage (org.apache.qpid.server.protocol.v0_10.MessageTransferMessage)6 AMQMessage (org.apache.qpid.server.protocol.v0_8.AMQMessage)6 HashMap (java.util.HashMap)4 Binary (org.apache.qpid.server.protocol.v1_0.type.Binary)4 AmqpValue (org.apache.qpid.server.protocol.v1_0.type.messaging.AmqpValue)4 Data (org.apache.qpid.server.protocol.v1_0.type.messaging.Data)4