headers.put("shortValue", "{short}:5");
headers.put("byteValue", "{byte}:1");
headers.put("stringValue", "{string}:5.0");
messageBuilder.setMessageHeaders(headers);
Message resultingMessage = messageBuilder.buildMessageContent(context, CitrusConstants.DEFAULT_MESSAGE_TYPE);
Assert.assertEquals(resultingMessage.getPayload(), "TestMessagePayload");
Assert.assertNotNull(resultingMessage.getHeader("intValue"));
Assert.assertEquals(resultingMessage.getHeader("intValue"), new Integer(5));
Assert.assertNotNull(resultingMessage.getHeader("longValue"));
Assert.assertEquals(resultingMessage.getHeader("longValue"), new Long(5));
Assert.assertNotNull(resultingMessage.getHeader("floatValue"));
Assert.assertEquals(resultingMessage.getHeader("floatValue"), new Float(5.0f));
Assert.assertNotNull(resultingMessage.getHeader("doubleValue"));
Assert.assertEquals(resultingMessage.getHeader("doubleValue"), new Double(5.0));
Assert.assertNotNull(resultingMessage.getHeader("boolValue"));
Assert.assertEquals(resultingMessage.getHeader("boolValue"), new Boolean(true));
Assert.assertNotNull(resultingMessage.getHeader("shortValue"));
Assert.assertEquals(resultingMessage.getHeader("shortValue"), new Short("5"));
Assert.assertNotNull(resultingMessage.getHeader("byteValue"));
Assert.assertEquals(resultingMessage.getHeader("byteValue"), new Byte("1"));
Assert.assertNotNull(resultingMessage.getHeader("stringValue"));
Assert.assertEquals(resultingMessage.getHeader("stringValue"), new String("5.0"));
}