title: Android TestSuite: Include all TestCases except some explicitly defined
body: <p>Problem: I need to adapt the code from the <a href="http://developer.android.com/resources/samples/ApiDemos/tests/src/com/example/android/apis/AllTests.html" rel="nofollow">Android Developer TestSuite example</a> so that it runs all TestCases in the package except a few explicitly defined ones. Currently it just runs them all:</p>
  
  <pre><code>public class AllTests extends TestSuite {
      public static Test suite() {
          return new TestSuiteBuilder(AllTests.class)
                  .includeAllPackagesUnderHere()
                  .build();
      }
  }
  </code></pre>
  
  <p>Looking at the <a href="http://developer.android.com/reference/android/test/suitebuilder/TestSuiteBuilder.html" rel="nofollow">Docs for TestSuiteBuilder</a>, perhaps I could adapt the above code by adding a call to TestSuiteBuilder's addRequirements() method, but I can't make heads or tails of if this will do it, or should be used to do it. </p>
  
  <p>If addRequirements will and should be used to exclude AndroidTestCases, how do I call it? I don't understand what argument I'd pass, the documentation says:</p>
  
  <pre><code>addRequirements(Predicate...&lt;TestMethod&gt; predicates)
  //Exclude tests that fail to satisfy all of the given predicates. 
  </code></pre>
  
  <p>But I can't find anything about the existence of a class <code>Predicate</code> or how it should be populated to achieve my goal.</p>
  
  <p>Thanks</p>