*/
public class MessageConverterTests {
@Test
public void testHeaderEmbedding() throws Exception {
EmbeddedHeadersMessageConverter converter = new EmbeddedHeadersMessageConverter();
Message<byte[]> message = MessageBuilder.withPayload("Hello".getBytes())
.setHeader("foo", "bar")
.setHeader("baz", "quxx")
.build();
Message<byte[]> converted = converter.embedHeaders(message, "foo", "baz");
assertEquals("\u0002\u0003foo\u0003bar\u0003baz\u0004quxxHello", new String(converted.getPayload()));
converted = converter.extractHeaders(converted);
assertEquals("Hello", new String(converted.getPayload()));
assertEquals("bar", converted.getHeaders().get("foo"));
assertEquals("quxx", converted.getHeaders().get("baz"));
}