### Question:
StackNameLengthValidator implements ConstraintValidator<ValidStackNameLength, String> { @Override public boolean isValid(String value, ConstraintValidatorContext context) { return Range.between(MIN_LENGTH, MAX_LENGTH).contains(value.length()); }  @Override boolean isValid(String value, ConstraintValidatorContext context);  }### Answer:
@Test public void testValidationSuccess() { assertTrue(underTest.isValid("right-length", context)); }
@Test public void testValidationFailure() { assertFalse(underTest.isValid("asd", context)); assertFalse(underTest.isValid("thisisaverylongstacknamewhichisnotallowedbecauseitistoolong", context)); }