@Test
public void jmsMessageWithNullPropertyAndNullContentTypeTest() throws JMSException {

    new TestKit(actorSystem) {{
        final ActorRef testActor = getTestActor();
        final ActorRef processor = setupActor(testActor, null);
        final Source source = Mockito.mock(Source.class);
        Mockito.when(source.getAuthorizationContext())
                .thenReturn(TestConstants.Authorization.AUTHORIZATION_CONTEXT);
        Mockito.when(source.getHeaderMapping())
                .thenReturn(Optional.of(ConnectivityModelFactory.newHeaderMapping(
                        Collections.singletonMap("correlation-id", "{{ header:correlation-id }}")
                )));
        final ActorRef underTest = actorSystem.actorOf(
                AmqpConsumerActor.props(CONNECTION_ID,
                        consumerData("foo123", Mockito.mock(MessageConsumer.class), source), processor,
                        getRef()));
        final String correlationId = "cor-";
        final String plainPayload =
                "{ \"topic\": \"org.eclipse.ditto.test/testThing/things/twin/commands/modify\"," +
                        " \"headers\":{\"device_id\":\"org.eclipse.ditto.test:testThing\"}," +
                        " \"path\": \"/features/point/properties/x\", \"value\": 42 }";
        final AmqpJmsTextMessageFacade messageFacade = new AmqpJmsTextMessageFacade();
        messageFacade.setApplicationProperty("JMSXDeliveryCount", null);
        messageFacade.setText(plainPayload);
        messageFacade.setContentType(null);
        messageFacade.setCorrelationId(correlationId);
        final JmsMessage jmsMessage = messageFacade.asJmsMessage();
        underTest.tell(jmsMessage, null);
        final Command<?> command = expectMsgClass(Command.class);
        assertThat(command.getType()).isEqualTo(ModifyFeatureProperty.TYPE);
        assertThat(command.getDittoHeaders().getCorrelationId()).contains(correlationId);
        assertThat(command.getDittoHeaders().getContentType()).isEmpty();
        assertThat(command.getDittoHeaders().get("JMSXDeliveryCount")).isNull();
        assertThat(((ModifyFeatureProperty) command).getPropertyPointer()).isEqualTo(JsonPointer.of("/x"));
        assertThat(((ModifyFeatureProperty) command).getPropertyValue()).isEqualTo(JsonValue.of(42));
    }};
}