assertFalse("isValid() Lth 9 ", routine.isValid("123456789")); assertFalse("isValid() Lth 11", routine.isValid("12345678901")); assertFalse("isValid() Lth 12", routine.isValid("123456789012")); assertFalse("isValid() Lth 14", routine.isValid("12345678901234")); fail("calculate() Lth 8 - expected exception"); } catch (Exception e) { assertEquals("calculate() Lth 8", "Invalid ISBN Length = 8", e.getMessage()); fail("calculate() Lth 10 - expected exception"); } catch (Exception e) { assertEquals("calculate() Lth 10", "Invalid ISBN Length = 10", e.getMessage()); fail("calculate() Lth 11 - expected exception"); } catch (Exception e) { assertEquals("calculate() Lth 11", "Invalid ISBN Length = 11", e.getMessage()); fail("calculate() Lth 13 - expected exception"); } catch (Exception e) { assertEquals("calculate() Lth 13", "Invalid ISBN Length = 13", e.getMessage());