}
@Test
public void bytesToMessage() throws Exception {
SimpleMessageConverter converter = new SimpleMessageConverter();
Message message = converter.toMessage(new byte[] { 1, 2, 3 }, new MessageProperties());
String contentType = message.getMessageProperties().getContentType();
byte[] body = message.getBody();
assertEquals("application/octet-stream", contentType);
assertEquals(3, body.length);
assertEquals(1, body[0]);
assertEquals(2, body[1]);
assertEquals(3, body[2]);