@Override
    public ValidationResult validate(Object value) {
        ValidationResult result = super.validate(value);

        if (result instanceof ValidationResult.ValidationPassed) {
            final String sValue = (String) value;
            if (sValue != null && sValue.length() > maxLength) {
                result = new ValidationResult.ValidationFailed("Value is longer than " + maxLength + " characters!");
            }
        }

        return result;
    }
@Test
    public void testValidateEmptyValue() {
        assertThat(new LimitedOptionalStringValidator(1).validate(""))
                .isInstanceOf(ValidationResult.ValidationPassed.class);
    }