public class ClearStatics
extends org.junit.rules.TestWatcher
This clears out things like the component accessor's worker, the authentication context, thread local searcher data, database configuration, and webwork configuration that may pollute this or some other test.
Just add this to your test:
@Rule public ClearStatics clearStatics = new ClearStatics();
Constructor and Description |
---|
ClearStatics() |
Modifier and Type | Method and Description |
---|---|
protected void |
finished(org.junit.runner.Description description) |
protected void |
starting(org.junit.runner.Description description) |
Copyright © 2002-2018 Atlassian. All Rights Reserved.