title: doNothing() and times() using at once in Mockito
body: <p>I would like to doNothing 29 times and when 30 time calling happens, then throw <code>ArithmeticException</code>. But i cannot find anything where to set TIMES attribute.
  This is my imagination:</p>
  
  <pre><code>@Mock
  DAOclass dao;
  
  @Test(expected = ArithmeticException.class)
  public void AAA() throws SQLException {
      doThrow(ArithmeticException.class).when(dao,times(30)).methodABC();
      for (int i = 0; i &lt; 30; i++) {
          dao.nothing();
      }
  }
  </code></pre>
  
  <p>But of course <code>when(dao,times(30))</code> is nonsense because i cannot add times(30) as second argument at when block.
  Does somebody have some idea what could be optional solution of this problem?</p>
  
  <p>Btw. my target is definitely not MANUALLY write 30 times <code>doNothing().doNothing().doNothing.... doThrow(...).when(...)</code></p>