DataValidationHelper dataValidationHelper = sheet.getDataValidationHelper();
DataValidationConstraint constraint = dataValidationHelper.createNumericConstraint(ValidationType.ANY,
OperatorType.IGNORED, null, null);
CellRangeAddressList addressList = new CellRangeAddressList(1, 2, 3, 4);
DataValidation validation = dataValidationHelper.createValidation(constraint, addressList);
validation.setEmptyCellAllowed(true);
validation.createErrorBox("error-title", "error-text");
validation.createPromptBox("prompt-title", "prompt-text");
sheet.addValidationData(validation);
list = sheet.getDataValidations(); // <-- works
assertEquals(1, list.size());