@Test public void shouldReturnTrueIfValidISBN() throws Exception { boolean actual = isbnConstraintValidator.isValid("0132350882", constraintValidatorContext); assertTrue(actual); }
@Test public void shouldReturnFalsIfInvalidISBN() throws Exception { boolean actual = isbnConstraintValidator.isValid("0123459789", constraintValidatorContext); assertFalse(actual); }
@Test public void initializeShouldTakeIsbn() throws Exception { ISBN isbn = mock(ISBN.class); isbnConstraintValidator.initialize(isbn); }