Collection<Attachment> attachments = resMsg.getAttachments();
assertNotNull(attachments);
assertEquals(1, attachments.size());
Attachment inAtt = attachments.iterator().next();
ByteArrayOutputStream out = new ByteArrayOutputStream();
IOUtils.copy(inAtt.getDataHandler().getInputStream(), out);
out.close();
assertEquals(37448, out.size());
}