title: Mockito not throwing exception using thenThrow
body: <p>I am using Mockito to mock the method of service layer.</p>
  
  <p>trying to mock the following line of code </p>
  
  <pre><code>boolean status= accountDAO.updateAccount(Account acct);
  </code></pre>
  
  <p>And To mock this I am using</p>
  
  <pre><code>Mockito.when(accountDAO.updateAccount(Account acct)).thenThrow(new DataBaseException());
  </code></pre>
  
  <p>But the problem is when code comes to the line <code>boolean status= accountDAO.updateAccount(Account acct);</code>, no exception gets thrown, it just works the normal way, without throwing an exception. Ideally an exception should be thrown, because I have mocked it to throw Database exception.</p>
  
  <p>While there is another method "find account", i.e </p>
  
  <pre><code>Account acc=accountDAO.find(Account.class,accountId);
  </code></pre>
  
  <p>for this method the exception is being thrown successfully using mocikto, but for the update method it is not working.</p>
  
  <p>Please help.</p>