private MailEndpoint endpoint;
private String body = "Hello World!";
@Test
public void testMailMessageHandlesMultipleHeaders() throws Exception {
mimeMessage.setRecipients(Message.RecipientType.TO, new Address[] {new InternetAddress("foo@localhost"), new InternetAddress("bar@localhost")});
<BUG>MailExchange exchange = endpoint.createExchange(mimeMessage);
MailMessage in = exchange.getIn();

assertEquals("mail body", body, in.getBody());</BUG>
Object to = in.getHeader("TO");

private MailEndpoint endpoint;
private String body = "Hello World!";
@Test
public void testMailMessageHandlesMultipleHeaders() throws Exception {
mimeMessage.setRecipients(Message.RecipientType.TO, new Address[] {new InternetAddress("foo@localhost"), new InternetAddress("bar@localhost")});
Exchange exchange = endpoint.createExchange(mimeMessage);
MailMessage in = (MailMessage)exchange.getIn();
assertNotNull(in);
assertEquals("mail body", body, in.getBody());
Object to = in.getHeader("TO");
