title: Mockito-ing to always throw exceptions except on specific methods
body: <p>How can I create a mock with Mockito that throws an exception on every method call except on some stubbed calls? Intuitively, I tried it by providing a default answer like this:</p>
  
  <pre><code>Iterator themock = mock(Iterator.class, 
      new ThrowsExceptionClass(UnsupportedOperationException.class));
  when(themock.hasNext()).thenReturn(false);
  assertFalse(themock.hasNext());
  </code></pre>
  
  <p>but the call <code>themock.hasNext()</code> in the second line already throws an <code>UnsupportedOperationException</code>.</p>