TabContainerViewImpl extends Composite implements TabContainerView { @Override public void addTab(@NotNull Tab tab) { final String title = tab.getTitle(); TabType tabType = tab.getTabType(); if (LEFT.equals(tabType)) { tabs.addStyleName(resources.runnerCss().leftTabContainerShadow()); } TabWidget tabWidget = widgetFactory.createTab(title, tabType); tabWidget.setDelegate(new TabWidget.ActionDelegate() { @Override public void onMouseClicked() { actionDelegate.onTabClicked(title); } }); tabs.add(tabWidget); titles.put(title, tabWidget); } @Inject  TabContainerViewImpl(RunnerResources resources, WidgetFactory widgetFactory); @Override void showTab(@NotNull Tab tab); @Override void selectTab(@NotNull Tab tab); @Override void setVisibleTitle(@NotNull Map<String, Boolean> tabVisibilities); @Override void addTab(@NotNull Tab tab); @Override void showTabTitle(@NotNull String tabName, boolean isShown); @Override void setDelegate(ActionDelegate actionDelegate);  }
@Test public void shadowShouldNotBeAddedWhenTabTypeIsRight() throws Exception { when(tab1.getTabType()).thenReturn(RIGHT); tabContainerView.addTab(tab1); verify(resources.runnerCss(), never()).leftTabContainerShadow(); verify(tabContainerView.tabs, never()).addStyleName(TITLE1); }