@Test
public void mapToJsonMessage() {

    final Map<String, String> headers = Map.of(
            "content-type", "application/vnd.hello.world+json",
            "ditto-message-subject", "hello/world",
            "ditto-message-thing-id", "thing:id"
    );
    final String payload = "{\"lorem\":\"ipsum\"}";
    final List<Adaptable> adaptables =
            underTest.map(ExternalMessageFactory.newExternalMessageBuilder(headers)
                    .withText(payload)
                    .build());
    assertThat(adaptables).hasSize(1);
    assertThat(adaptables.get(0).getPayload().getValue()).contains(JsonObject.of(payload));
    final Signal<?> signal = ADAPTER.fromAdaptable(adaptables.get(0));
    assertThat(signal).isInstanceOf(SendThingMessage.class);
    final SendThingMessage<?> sendThingMessage = (SendThingMessage<?>) signal;
    assertThat(sendThingMessage.getEntityId().toString()).isEqualTo("thing:id");
    assertThat(sendThingMessage.getMessage().getPayload().orElseThrow()).isEqualTo(JsonObject.of(payload));
}