The canonical case of filtering is when you want to run a single test method in a class. Rather
than introduce runner API just for that one case, JUnit provides a general filtering mechanism.
If you want to filter the tests to be run, extend Filter and apply an instance of
your filter to the Request before running it (see JUnitCore.run(Request request)).
Alternatively, apply a Filter to a Runner before running
tests (for example, in conjunction with @RunWith.
Filterand apply an instance of your filter to theRequestbefore running it (seeJUnitCore.run(Request request)). Alternatively, apply aFilterto aRunnerbefore running tests (for example, in conjunction with@RunWith.