Message message = messages[0];
assertTrue(message.getContentType().equalsIgnoreCase("application/blubb"));
InputStream contentStream = (InputStream) message.getContent();
byte[] bytes = IOUtils.toByteArray(contentStream);
assertArrayEquals(createLargeByteArray(), bytes);
<BUG>message.writeTo(new ByteArrayOutputStream());
}</BUG>
private byte[] createLargeByteArray() {
byte[] bytes = new byte[100 * 1024 + 100];
Arrays.fill(bytes, (byte) 100);

Message message = messages[0];
assertTrue(message.getContentType().equalsIgnoreCase("application/blubb"));
InputStream contentStream = (InputStream) message.getContent();
byte[] bytes = IOUtils.toByteArray(contentStream);
assertArrayEquals(createLargeByteArray(), bytes);
message.writeTo(new ByteArrayOutputStream());
} finally {
retriever.close();
}
}
private byte[] createLargeByteArray() {
byte[] bytes = new byte[100 * 1024 + 100];
Arrays.fill(bytes, (byte) 100);
