ShutdownToken (@NotNull Project project, @NotNull Disposable testRootDisposable) { ShutdownToken shutdownToken = setUpTestInternal(project, testRootDisposable); Disposer.register(testRootDisposable, new Disposable() { @Override public void dispose() { tearDownTest(project, shutdownToken); } }); return shutdownToken; }