title: Why ExpectedException is deprecated in Spring
body: <p>On the one side, there is a new <code>@RunWith</code> annotation that lets to change unit test framework on the fly.
  But on the other side Spring documentations says about <code>org.springframework.test.annotation.ExpectedException</code>:</p>
  
  <ul>
  <li>@deprecated as of Spring 3.1 in favor of using built-in support for declaring expected exceptions in the underlying testing framework (e.g., JUnit, TestNG, etc.)</li>
  </ul>
  
  <p>As a result my code will depend on the unit test framework. Please explain it.</p>
  
  <p>And the 2nd question. At the moment I implement tests with Spring <code>@RunWith</code> annotation. But I also add the jUnit specific <code>org.junit.Test</code> annotation to each test method. Again, if I understand correctly the best way - to write tests, so I could change for example jUnit onto TestNg. And Spring <code>@RunWith</code> helps me to do that. But how can I avoid using of the <code>org.junit.Test</code> annotation?</p>