title: How to get a collection of tests in a JUnit 4 test suite
body: <p>In JUnit 3, I could get all of the tests within a test suite with the following code:</p>
  
  <pre><code>TestSuite allTestsSuite = (TestSuite) AllTests.suite()
  Enumeration enumeration = allTestsSuite.tests();
  ArrayList listOfTests = Collection.list(enumeration);
  </code></pre>
  
  <p>However, I can't find an equivalent way of doing this in JUnit 4. Classes no longer have a <code>.suite()</code> method; they simply use the <code>@Suite</code> annotation. This wouldn't be a problem except that the <a href="http://junit.sourceforge.net/javadoc/org/junit/runners/Suite.html" rel="nofollow">Suite class</a> no longer has a <code>tests()</code> method. There is a <code>children()</code> method, but that returns a list of Runners, which seem to be something different than why I'm looking for.</p>
  
  <p>So how can I get the tests within a test suite in JUnit 4, like I could with JUnit 3?</p>