void (@Nullable Boolean honourRecentFiles, @NotNull Disposable disposable) { getApp().putUserData(ENABLE_IN_TESTS, Boolean.TRUE); getApp().putUserData(HONOUR_RECENT_FILES_IN_TESTS, honourRecentFiles); getApp().putUserData(ACCESS_ALLOWED, null); Disposer.register(disposable, () -> { getApp().putUserData(ENABLE_IN_TESTS, null); getApp().putUserData(HONOUR_RECENT_FILES_IN_TESTS, null); getApp().putUserData(ACCESS_ALLOWED, null); }); }