TemplatesViewImpl extends Composite implements TemplatesView { @Override public void setDefaultProjectWidget(@Nullable EnvironmentWidget widget) { defaultRunner.setWidget(widget == null ? defaultRunnerStub : widget); for (Environment environment : environmentWidgets.keySet()) { environmentWidgets.get(environment).update(environment); } } @Inject  TemplatesViewImpl(RunnerResources resources,
                             RunnerLocalizationConstant locale,
                             WidgetFactory widgetFactory,
                             DefaultRunnerInfo defaultRunnerInfo,
                             PopupPanel popupPanel); @Override void addEnvironment(@NotNull Map<Scope, List<Environment>> environments); @Override void selectEnvironment(@Nullable Environment selectedEnvironment); @Override void setFilterWidget(@NotNull FilterWidget filterWidget); @Override void setDefaultProjectWidget(@Nullable EnvironmentWidget widget); @Override void scrollTop(int index); @Override void showDefaultEnvironmentInfo(@NotNull Environment defaultEnvironment); @Override void clearEnvironmentsPanel(); @Override void setDelegate(@NotNull ActionDelegate delegate);  }
@Test public void defaultRunnerShouldBeSet() throws Exception { view.setDefaultProjectWidget(environmentWidget); verify(view.defaultRunner).setWidget(environmentWidget); }