use of org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.MapToAmqpMapConverter in project qpid-broker-j by apache.
the class MessageConverter_0_8_to_InternalTest method testConvertAmqpMapMessageBody.
public void testConvertAmqpMapMessageBody() throws Exception {
final Map<String, Object> expected = Collections.singletonMap("key", "value");
final byte[] messageBytes = new MapToAmqpMapConverter().toMimeContent(expected);
doTestMapMessage(messageBytes, "amqp/map", expected);
}
use of org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.MapToAmqpMapConverter in project qpid-broker-j by apache.
the class MessageConverter_Internal_to_0_8Test method testMapMessageWithMimeTypeWithNonJmsContent.
public void testMapMessageWithMimeTypeWithNonJmsContent() throws Exception {
HashMap<Object, Object> content = new HashMap<>();
content.put("key", Collections.singletonMap("foo", "bar"));
final String mimeType = "foo/bar";
final MapToAmqpMapConverter mapToAmqpMapConverter = new MapToAmqpMapConverter();
final byte[] expectedContent = mapToAmqpMapConverter.toMimeContent(content);
doTest(content, mimeType, expectedContent, mapToAmqpMapConverter.getMimeType());
}
Aggregations