public Message createMessage(String messageString) {
        Message message;
        try {
            Map<String, Object> map = objectMapper.readValue(messageString, Map.class);
            if (!map.containsKey("_id")) {
                map.put("_id", UUID.randomUUID().toString());
            }
            final String messageField = "message"; // message field must be of type string
            if (map.containsKey(messageField) && !(map.get(messageField) instanceof String)) {
                map.put(messageField, String.valueOf(map.get(messageField)));
            }
            message = messageFactory.createMessage(map);
        } catch (JacksonException e) {
            message = messageFactory.createMessage(messageString, "127.0.0.1", DateTime.now(DateTimeZone.UTC));
            if (StringUtils.startsWith(StringUtils.trim(messageString), "{")) {
                message.addField("gl2_simulator_json_error",
                        "Cannot parse simulation message as JSON. Using as raw message field instead: " + e.getMessage());
            }
        }

        return message;
    }
@Test
    void createMessage() {
        String notAJsonMessage = "{Not a json message}";
        Message result = ruleSimulator.createMessage(notAJsonMessage);
        Assertions.assertEquals(result.getMessage(), notAJsonMessage);
    }