}
@Test
public void messageToBytes() {
SimpleMessageConverter converter = new SimpleMessageConverter();
Message message = new Message(new byte[] { 1, 2, 3 }, new MessageProperties());
message.getMessageProperties().setContentType(MessageProperties.CONTENT_TYPE_BYTES);
Object result = converter.fromMessage(message);
assertEquals(byte[].class, result.getClass());
byte[] resultBytes = (byte[]) result;
assertEquals(3, resultBytes.length);
assertEquals(1, resultBytes[0]);