@After
annotation identifies a method to run after each test:
@After protected void disposeDocument() {
doc = null;
System.gc();
}
Method name is irrelevant
Multiple methods can be annotated @After
, each of which is run after each test method.
@After
in superclasses are run automatically
@After
in superclasses are run after those in subclasses
Order is otherwise unspecified
Overridden methods are not run.