@Test
public void testBinaryJavascriptIncomingMapping() {

    final String correlationId = UUID.randomUUID().toString();
    final Map<String, String> headers = new HashMap<>();
    headers.put(HEADER_CORRELATION_ID, correlationId);
    headers.put(ExternalMessage.CONTENT_TYPE_HEADER, CONTENT_TYPE_BINARY);
    final ExternalMessage message = ExternalMessageFactory.newExternalMessageBuilder(headers)
            .withBytes(MAPPING_INCOMING_PAYLOAD_BYTES)
            .build();
    assertThat(javaScriptRhinoMapperBinary.map(message)).allSatisfy(adaptable -> {
        System.out.println(adaptable);
        final long startTs = System.nanoTime();
        System.out.println(
                "testBinaryJavascriptIncomingMapping Duration: " + (System.nanoTime() - startTs) / 1_000_000.0 +
                        "ms");
        assertThat(adaptable.getTopicPath()).satisfies(topicPath -> {
            assertThat(topicPath.getChannel()).isEqualTo(TopicPath.Channel.TWIN);
            assertThat(topicPath.getCriterion()).isEqualTo(TopicPath.Criterion.COMMANDS);
            assertThat(topicPath.getAction()).contains(TopicPath.Action.MODIFY);
            assertThat(topicPath.getNamespace()).isEqualTo(MAPPING_INCOMING_NAMESPACE);
            assertThat(topicPath.getId()).isEqualTo(MAPPING_INCOMING_ID);
        });
        assertThat(adaptable.getPayload()).satisfies(payload -> {
            assertThat(payload.getPath().toString()).isEqualTo(MAPPING_INCOMING_PATH);
            assertThat(payload.getValue()).contains(JsonValue.of(MAPPING_INCOMING_PAYLOAD_STRING));
        });
    });
}