@Test
public void mapFromMessageWithBinaryPayload() {

    final DittoHeaders dittoHeaders = DittoHeaders.newBuilder().randomCorrelationId().build();
    final Message<Object> message = messageBuilder("application/whatever")
            .rawPayload(ByteBuffer.wrap(new byte[]{1, 2, 3, 4, 5, 6}))
            .build();
    final Signal<?> sendThingMessage = SendThingMessage.of(THING_ID, message, dittoHeaders);
    final List<ExternalMessage> result = underTest.map(ADAPTER.toAdaptable(sendThingMessage));
    assertThat(result).hasSize(1);
    assertThat(result.get(0).getBytePayload()).satisfies(byteBufferOptional -> {
        assertThat(byteBufferOptional).isNotEmpty();
        assertThat(byteBufferOptional.get())
                .isEqualTo(ByteBuffer.wrap(new byte[]{1, 2, 3, 4, 5, 6}));
    });
    assertThat(result.get(0).getTextPayload()).isEmpty();
    assertThat(result.get(0).getHeaders()).containsAllEntriesOf(message.getHeaders());
}