TemplatesViewImpl extends Composite implements TemplatesView { @Override public void clearEnvironmentsPanel() { environmentWidgets.clear(); environmentsPanel.clear(); } @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 environmentsPanelShouldBeCleared() throws Exception { view.clearEnvironmentsPanel(); verify(view.environmentsPanel).clear(); }