@Test
public void testConvertMapMessageToAmqpMessage() throws Exception {

    ActiveMQMapMessage outbound = createMapMessage();
    outbound.setString("property-1", "string");
    outbound.setInt("property-2", 1);
    outbound.setBoolean("property-3", true);
    outbound.onSend();
    outbound.storeContent();
    JMSMappingOutboundTransformer transformer = new JMSMappingOutboundTransformer();
    EncodedMessage encoded = transformer.transform(outbound);
    assertNotNull(encoded);
    Message amqp = encoded.decode();
    assertNotNull(amqp.getBody());
    assertTrue(amqp.getBody() instanceof AmqpValue);
    assertTrue(((AmqpValue) amqp.getBody()).getValue() instanceof Map);
    @SuppressWarnings("unchecked")
    Map<Object, Object> amqpMap = (Map<Object, Object>) ((AmqpValue) amqp.getBody()).getValue();
    assertEquals(3, amqpMap.size());
    assertTrue("string".equals(amqpMap.get("property-1")));
}