Sure.
JUnit 4 uses annotations to determine what methods are
test methods.
In the above code, testMethodA will be run as a test method since it is annotated with the @Test annotation, where anotherTestMethod will not since it does not have the annotation.
Note this only works with JUnit4.x (since JUnit3 considered any method that started with the
word test to be a test method).