TemplatesPresenter implements TemplatesContainer, FilterWidget.ActionDelegate, TemplatesView.ActionDelegate { @NotNull @Override public IsWidget getView() { return view; } @Inject  TemplatesPresenter(TemplatesView view,
                              FilterWidget filter,
                              EnvironmentWidget defaultEnvWidget,
                              AppContext appContext,
                              GetProjectEnvironmentsAction projectEnvironmentsAction,
                              GetSystemEnvironmentsAction systemEnvironmentsAction,
                              GetEnvironmentsUtil environmentUtil,
                              PropertiesContainer propertiesContainer,
                              SelectionManager selectionManager,
                              AsyncCallbackBuilder<ItemReference> asyncCallbackBuilder,
                              RunnerManagerView runnerManagerView,
                              NotificationManager notificationManager,
                              RunnerUtil runnerUtil,
                              RunnerResources resources,
                              PanelState panelState,
                              ProjectServiceClient projectService,
                              AsyncCallbackBuilder<ProjectDescriptor> asyncDescriptorCallbackBuilder,
                              ChooseRunnerAction chooseRunnerAction); @Override void select(@Nullable Environment environment); @Override List<Environment> addEnvironments(@NotNull RunnerEnvironmentTree tree, @NotNull Scope scope); @NotNull List<Environment> getProjectEnvironments(); @Override void showEnvironments(); @Override void selectEnvironment(); @Override void onValueChanged(); @Override void changeEnableStateRunButton(); @Override void setDefaultEnvironment(@Nullable Environment environment); @Override void onDefaultRunnerMouseOver(); @Override void createNewEnvironment(); @Override void go(@NotNull AcceptsOneWidget container); @NotNull @Override IsWidget getView(); @Override void setVisible(boolean visible);  }
@Test public void viewShouldBeReturned() throws Exception { TemplatesView widget = (TemplatesView)presenter.getView(); assertThat(widget, equalTo(view)); }