### Question:
SessionPresenterView extends Composite implements SessionPresenter.View { @Override public SessionPresenter.View showWarning(final String message) { singleNotify(() -> { getSettings().setType(kieNotificationCssClass(NotifyType.WARNING)); showNotification(translate(SessionPresenterView_Warning), message, IconType.EXCLAMATION_TRIANGLE); }); return this; }  @PostConstruct void init(); @Override IsWidget getCanvasWidget(); @Override IsWidget getToolbarWidget(); @Override IsWidget getSessionHeaderContainer(); @Override IsWidget getPaletteWidget(); @Override ScrollType getContentScrollType(); @Override SessionPresenterView setToolbarWidget(final IsWidget widget); @Override SessionPresenterView setSessionHeaderContainer(final IsWidget widget); @Override SessionPresenterView setPaletteWidget(final PaletteWidget<PaletteDefinition> paletteWidget); @Override SessionPresenterView setCanvasWidget(final IsWidget widget); @Override void setContentScrollType(final ScrollType type); @Override SessionPresenterView showError(final String message); @Override void showSessionHeaderContainer(final int sessionHeaderHeight); @Override void hideSessionHeaderContainer(); @Override SessionPresenter.View showWarning(final String message); @Override SessionPresenterView showMessage(final String message); @Override SessionPresenterView showLoading(final boolean loading); @Override void onResize(); void destroy();  }### Answer:
@Test public void testShowWarning() { final SessionPresenterView view = spy(new SessionPresenterView()); final String warning = "Warning"; when(translationService.getTranslation(SessionPresenterView_Warning)).thenReturn(warning); when(view.getTranslationService()).thenReturn(translationService); when(view.getSettings()).thenReturn(settings); view.showWarning("Warning"); view.showWarning("Warning"); view.showWarning("Warning"); verify(settings).setType("warning kie-session-notification"); verify(view, times(1)).showNotification(warning, "Warning", IconType.EXCLAMATION_TRIANGLE); }