title: Intercepting JUnit Assert functions
body: <p>I would like to do some "own stuff" when an assertion in JUnit fails. I would like to have this:</p>
  
  <pre><code>public class MyAssert extends org.junit.Assert {
  
      // @Override
      static public void fail(String message) {
          System.err.println("I am intercepting here!");
          org.junit.Assert.fail(message);
      }
  }
  </code></pre>
  
  <p>Of course, this does not work, because you cannot override static methods. But if it would, this would be nice, because every assert function like <code>assertTrue()</code> calls the <code>fail()</code> method. Thus, I could easily intercept every assertion.</p>
  
  <p>Does there exist any way to do what I want to do here, without implementing all different flavors of <code>assert...</code>?</p>