@Override
    public ValidationResult validate(Object value) {
        ValidationResult result = super.validate(value);
        if (result instanceof ValidationResult.ValidationPassed) {
            final String sValue = (String)value;
            if (sValue.length() < minLength || sValue.length() > maxLength) {
                result = new ValidationResult.ValidationFailed("Value is not between " + minLength + " and " + maxLength + " in length!");
            }
        }
        return result;
    }
@Test
    public void testValidateValidString() {
        assertThat(new LimitedStringValidator(1, 5).validate("test"))
                .isInstanceOf(ValidationResult.ValidationPassed.class);
    }