@Test
public void doForwardMappingContextWithPolicyPlaceholder() {

    final Map<String, String> headers = createValidHeaders();
    underTest.configure(mappingConfig, createMapperConfig(THING_TEMPLATE_WITH_POLICY, COMMAND_HEADERS));
    final ExternalMessage externalMessage = ExternalMessageFactory.newExternalMessageBuilder(headers).build();
    final List<Adaptable> mappingResult = underTest.map(externalMessage);
    final Signal<?> firstMappedSignal = getFirstMappedSignal(mappingResult);
    assertThat(firstMappedSignal).isInstanceOf(CreateThing.class);
    final CreateThing createThing = (CreateThing) firstMappedSignal;
    final Thing expectedThing =
            createExpectedThing(DEVICE_ID, DEVICE_ID,
                    GATEWAY_ID);
    assertThat(createThing.getThing().getEntityId()).isEqualTo(expectedThing.getEntityId());
    assertThat(createThing.getThing().getPolicyEntityId()).isEqualTo(expectedThing.getPolicyEntityId());
    assertThat(createThing.getThing().getAttributes()).isEqualTo(expectedThing.getAttributes());
    assertThat(createThing.getInitialPolicy()).contains(INITIAL_POLICY);
    assertThat(createThing.getDittoHeaders().isAllowPolicyLockout()).isEqualTo(true);
}