public static String formatMessage(String messageId, Map<String, String> values) {
        String message = messages.get(messageId);
        if(message == null) {
            log.log(Level.WARNING, "No message found for id {0}", messageId);
            return "";
        }
        
        if(values == null || values.isEmpty()) {
            return message;
        } else {
            for(Map.Entry<String, String> value : values.entrySet()) {
                message = message.replace(value.getKey(), value.getValue());
            }
            return message;
        }
    }