class ImmutableMessageHeaders extends AbstractDittoHeaders implements MessageHeaders {

    @Override
    public MessageDirection getDirection() {
        final HeaderDefinition definition = MessageHeaderDefinition.DIRECTION;
        return getStringForDefinition(definition)
                .map(String::toUpperCase)
                .map(MessageDirection::valueOf)
                .orElseThrow(() -> newIllegalStateException(definition));
    }

    private  ImmutableMessageHeaders(final Map<String, String> theDittoHeaders);

}