diff --git a/chapter4/bankService/SavingsAccountTest.java b/chapter4/bankService/SavingsAccountTest.java index e16b4dc..b3ec345 100644 --- a/chapter4/bankService/SavingsAccountTest.java +++ b/chapter4/bankService/SavingsAccountTest.java @@ -56,3 +56,12 @@ private Object[][] createValidWithdrawData() { */ @Test public void withdrawingAmountGreaterThanBalance_Throws_InsufficientFundsException() throws InsufficientFundsException { + try { + savings.withdraw(200.00); + fail("Expected Insufficient Funds Exception but none is thrown"); + } catch (InsufficientFundsException e){ + // Then + assertEquals(savings.getBalance(), 100.00); + } + } +}