title: How to create a JUnit 4 test suite to pass when expected exceptions are thrown
body: <p>I am writing a JUnit 4 test suite which runs some tests that check if an exception has been thrown. On their own, my tests look somewhat like this:</p>
  
  <pre><code>@RunWith(value=BlockJUnit4ClassRunner.class)
  public class CreateCommandsExceptionsTest extends TestCase {
      Statistics statistics;
      @Before
      public void setUp(){
          ...
      }
          ...
      @Test (expected=StatsArrayTooShortException.class)
      public void testStatsArrayTooShortException(){
          ...
      }
  </code></pre>
  
  <p>The tests run fine on their own, but when I attempt to put them in a test suite, they fail because the exception that I am testing for is being thrown.</p>
  
  <p>My test suite looks like:</p>
  
  <pre><code>@RunWith(value=BlockJUnit4ClassRunner.class)
  public class UnitTestSuite {
  public static testSuite(){
      TestSuite suite = new TestSuite("Test for unitTests");
  
      suite.addTestSuite(StatisticsTest.class);
      ...
      return suite;
  }
  }
  </code></pre>
  
  <p>If anyone could tell me how I should be setting up my test suite so that I can pass a test when I catch an expected exception, I would appreciate it.</p>