JUnit4 provides two annotations (
@AfterClass) that are applied to methods that are run once per
test class. These complement the more-often used
which are applied to methods that are run one per test class.
@AfterClass methods without making an instance
of the test class, meaning that the methods must be
static. JUnit4 will fail
to run any
@AfterClass method that isn’t also
Suppress false positives by adding an
@SuppressWarnings("JUnit4ClassAnnotationNonStatic") annotation to the enclosing element.