void (@NotNull RunnerAndConfigurationSettings configuration) { Assert.assertTrue(configuration.getConfiguration() instanceof FakeRunConfiguration); final RunManager runManager = RunManager.getInstance(getProject()); runManager.addConfiguration(configuration); Disposer.register(getTestRootDisposable(), new Disposable() { @Override public void dispose() { runManager.removeConfiguration(configuration); } }); }