### Question:
SessionPresenterView extends Composite implements SessionPresenter.View { @EventHandler("sessionContainer") protected void onScroll(@ForEvent("scroll") ScrollEvent e) { palettePanel.getElement().getStyle().setTop(paletteInitialTop + e.getRelativeElement().getScrollTop() + sessionHeaderHeight, Style.Unit.PX); palettePanel.getElement().getStyle().setLeft(paletteInitialLeft + e.getRelativeElement().getScrollLeft(), Style.Unit.PX); sessionHeaderContainer.getElement().getStyle().setTop(headerInitialTop + e.getRelativeElement().getScrollTop(), Style.Unit.PX); sessionHeaderContainer.getElement().getStyle().setLeft(headerInitialLeft + e.getRelativeElement().getScrollLeft(), Style.Unit.PX); e.preventDefault(); }  @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 testOnScroll() { reset(element); when(element.getScrollTop()).thenReturn(100); when(element.getScrollLeft()).thenReturn(200); tested.onScroll(scrollEvent); verify(paletteStyle, times(1)).setTop(100, Style.Unit.PX); verify(paletteStyle, times(1)).setLeft(200, Style.Unit.PX); }