@Test public void repair() { testingBook.setState(EBookState.DAMAGED); assertEquals(testingBook.getState(), EBookState.DAMAGED); testingBook.repair(); }
@Test public void testRepairBookNotDamaged() { testingBook.setState(EBookState.ON_LOAN); try { testingBook.repair(); fail("Runtime Exception"); } catch (RuntimeException e) { assertTrue(true); } }