class ImplicitThingCreationMessageMapper extends AbstractMessageMapper {

    @Override
    public List<Adaptable> map(final ExternalMessage message) {
        LOGGER.withCorrelationId(message.getInternalHeaders()).debug("Received ExternalMessage: {}", message);

        final Map<String, String> externalHeaders = message.getHeaders();
        final ExpressionResolver expressionResolver = getExpressionResolver(externalHeaders);

        final String resolvedTemplate;
        if (Placeholders.containsAnyPlaceholder(thingTemplate)) {
            resolvedTemplate = applyPlaceholderReplacement(thingTemplate, expressionResolver);
        } else {
            resolvedTemplate = thingTemplate;
        }

        if (Placeholders.containsAnyPlaceholder(thingTemplate)) {
            commandHeaders = resolveCommandHeaders(message, commandHeaders);
        }

        final Signal<CreateThing> createThing = getCreateThingSignal(message, resolvedTemplate);
        final Adaptable adaptable = DITTO_PROTOCOL_ADAPTER.toAdaptable(createThing);

        // we cannot set the header on CreateThing directly because it is filtered when mapped to an adaptable
        final DittoHeaders modifiedHeaders =
                adaptable.getDittoHeaders().toBuilder().allowPolicyLockout(allowPolicyLockout).build();
        final Adaptable adaptableWithModifiedHeaders = adaptable.setDittoHeaders(modifiedHeaders);

        LOGGER.withCorrelationId(message.getInternalHeaders())
                .debug("Mapped ExternalMessage to Adaptable: {}", adaptableWithModifiedHeaders);

        return Collections.singletonList(adaptableWithModifiedHeaders);
    }

}