class ValueValidatorService {

    public void validate(Object obj, Class<?>... groups) {
        final List<String> violations = validator.validate(obj, groups).stream()
                                            .map(vl -> vl.getPropertyPath().toString() + " : " + vl.getMessage())
                                            .collect(Collectors.toList());

        if (!violations.isEmpty()) {
            log.debug("Value validation failed: {}", violations.toString());
            throw new ValidationException(FORMAT_ERROR.name() + ": " + violations);
        }
    }

    @Autowired public  ValueValidatorService(Validator validator);

}