class QualityThresholdTransformer {

    public Map<String, QualityThreshold> toMap(String jsonQualityThreshold) {
        final Map<String, QualityThreshold> result = new HashMap<>();
        if (!StringUtils.isEmpty(jsonQualityThreshold)) {
            try {
                return objectMapper.readValue(jsonQualityThreshold, TYPE_REFERENCE);
            } catch (IOException e) {
                log.error("Cannot parse qualityThresholds: {} - Cause : {}", jsonQualityThreshold, e.getMessage());
                log.debug("Full error is {}", e);
                return new HashMap<>();
            }
        }
        return result;
    }

}