Config based enable/disable JUnit Test
===

What is the best way to enable/disable a junit test based on a Config parameter? Say I have a Config class which dictates some state of the software that makes a given set of tests invalid.

I could put the body of the test in an if statement within the test method, e.g.:

    @Test
    public void someTest() {
       if(Config.shouldIRunTheTests()) {
          //do the actual test
       }
    }

This seems bad because I actually get test passes for these cases when I actually want these tests skipped.
Would like something like:

    @Test[Config.shouldIRunTheTests()] 
    public void someTest() {
        //do the actual test
    }

Is this possible?