void (@Nullable DataProvider provider, @NotNull Disposable parentDisposable) { DataProvider previous = myTestDataProvider; myTestDataProvider = provider; Disposer.register(parentDisposable, () -> myTestDataProvider = previous); }