title: In Java how can I validate a thrown exception with JUnit?
body: <p>When writing unit tests for a Java API there may be circumstances where you want to perform more detailed validation of an exception. I.e. more than is offered by the <em>@test</em> annotation offered by JUnit.</p>
  
  <p>For example, consider an class that should catch an exception from some other Interface, wrap that exception and throw the wrapped exception. You may want to verify:</p>
  
  <ol>
  <li>The exact method call that throws the wrapped exception.</li>
  <li>That the wrapper exception has the original exception as its cause.</li>
  <li>The message of the wrapper exception.</li>
  </ol>
  
  <p>The main point here is that you want to be perf additional validation of an exception in a unit test (not a debate about whether you <em>should</em> verify things like the exception message).</p>
  
  <p>What's a good approach for this?</p>