title: JUnit 4 : Expect one exception multiple times
body: <p>I have the following piece of code:</p>
  
  <pre><code>@Test(expected = IllegalArgumentException.class)
  public void failureTest()    {
      testedObject.supposedToFail("");
      testedObject.supposedToFail(null);
  }
  </code></pre>
  
  <p>When running this, I have no guarantee that I will throw an <code>IllegalArgumentException</code> with a <code>null</code> parameter. Indeed, whenever JUnit meets the first exception, it stops the run of the whole method.</p>
  
  <p>Considering the number of test cases I have to try for this class (~20), I doubt writing 20 methods each expecting a specific exception (which are often the same, tho) would be efficient.</p>
  
  <p>Is there any way to try for every method throwing a specific exception at once ? (e.g. with my sample, you would go through both methods)</p>
  
  <p>Thank you</p>