@Test
public void buildMessageShouldReturnSameData() {

    final byte[] input = "testText".getBytes(Charset.forName("UTF-8"));
    Message message = EventPublisher.buildMessage(TEST_CONFIGURATION,
            new ContainsData() {
                @Override
                public void setData(byte[] data) {}
                @Override
                public byte[] getData() {
                    return input;
                }
            }
    );
    byte[] output = message.getBodyContent();
    Assert.assertArrayEquals(input, output);
}