@Test
public void testCreatingKafkaExchangeSetsHeaders() throws URISyntaxException {
KafkaEndpoint endpoint = new KafkaEndpoint("kafka:localhost", "localhost", new KafkaComponent());
Message message = new Message("mymessage".getBytes(), "somekey".getBytes());
DefaultDecoder decoder = new DefaultDecoder(null);
MessageAndMetadata<byte[], byte[]> mm =
new MessageAndMetadata<byte[], byte[]>("topic", 4, message, 56, decoder, decoder);
Exchange exchange = endpoint.createKafkaExchange(mm);
assertEquals("somekey", exchange.getIn().getHeader(KafkaConstants.KEY));