class ObjectMapperUtil {

    public String convertToString(Object object) {
        try {
            return objectMapper.writeValueAsString(object);
        } catch (JsonProcessingException e) {
            throw new RuntimeException("JSON serialization to String failed", e);
        }
    }

}