### Question:
CheckClientSelectFieldsStateValidator implements ConstraintValidator<CheckClientSelect,
        ClientSelect>, ValidationErrorDescriptorBuilder { @Override public boolean isValid(ClientSelect value, ConstraintValidatorContext context) { List<ClientQueryField> fields = Optional.ofNullable(value.getFields()).orElse(new ArrayList<>()); List<ClientQueryField> distinctFields = Optional.ofNullable(value.getDistinctFields()).orElse(new ArrayList<>()); return !(fields.size() > 0 && distinctFields.size() > 0); }  @Override void initialize(CheckClientSelect constraintAnnotation); @Override boolean isValid(ClientSelect value, ConstraintValidatorContext context); @Override ErrorDescriptor build(ConstraintViolation violation);  }### Answer:
@Test public void isNotValid_clientSelectObjectWithNotEmptyFieldListAndNotEmptyDistinctFieldList_returnFalse() { ClientSelect clientSelect = new ClientSelect(asList(clientQueryField)); clientSelect.setDistinctFields(asList(clientQueryField)); assertFalse(validator.isValid(clientSelect, validatorContext)); }