title: How to test that no exception is thrown?
body: <p>I know that one way to do it would be:</p>
  <pre><code>@Test
  public void foo() {
     try {
        // execute code that you expect not to throw Exceptions.
     } catch(Exception e) {
        fail(&quot;Should not have thrown any exception&quot;);
     }
  }
  </code></pre>
  <p>Is there any cleaner way of doing this? (Probably using Junit's <code>@Rule</code>?)</p>