@Test
public void plainStringMappingTest() {

    new TestKit(actorSystem) {{
        final MappingContext mappingContext = ConnectivityModelFactory.newMappingContext(
                "JavaScript",
                JavaScriptMessageMapperFactory.createJavaScriptMessageMapperConfigurationBuilder(
                        "plainStringMapping", Collections.emptyMap())
                        .incomingScript(TestConstants.Mapping.INCOMING_MAPPING_SCRIPT)
                        .outgoingScript(TestConstants.Mapping.OUTGOING_MAPPING_SCRIPT)
                        .build()
                        .getPropertiesAsJson()
        );
        final ActorRef processor = setupActor(getRef(), mappingContext);
        final Source source = Mockito.mock(Source.class);
        Mockito.when(source.getAuthorizationContext())
                .thenReturn(TestConstants.Authorization.AUTHORIZATION_CONTEXT);
        Mockito.when(source.getPayloadMapping()).thenReturn(ConnectivityModelFactory.newPayloadMapping("test"));
        final ActorRef underTest = actorSystem.actorOf(AmqpConsumerActor.props(CONNECTION_ID,
                consumerData("foo", Mockito.mock(MessageConsumer.class), source), processor, getRef()));
        final String plainPayload = "hello world!";
        final String correlationId = "cor-";
        underTest.tell(getJmsMessage(plainPayload, correlationId), null);
        final Command<?> command = expectMsgClass(Command.class);
        assertThat(command.getType()).isEqualTo(ModifyAttribute.TYPE);
        assertThat(command.getDittoHeaders().getCorrelationId()).contains(correlationId);
        assertThat(((ModifyAttribute) command).getAttributePointer()).isEqualTo(JsonPointer.of("/foo"));
        assertThat(((ModifyAttribute) command).getAttributeValue()).isEqualTo(JsonValue.of(plainPayload));
    }};
}