ConsoleButtonImpl extends Composite implements ConsoleButton, ClickHandler, MouseOverHandler, MouseOutHandler { @Override public void onMouseOver(MouseOverEvent mouseOverEvent) { tooltip.setPopupPosition(getAbsoluteLeft(), getAbsoluteTop() + TOP_TOOLTIP_SHIFT); tooltip.show(); } @Inject  ConsoleButtonImpl(ButtonResources resources,
                             TooltipWidget tooltip,
                             @NotNull @Assisted String prompt,
                             @NotNull @Assisted SVGResource image); @Override void setCheckedStatus(boolean isChecked); @Override void setDelegate(ActionDelegate delegate); @Override void onClick(ClickEvent clickEvent); @Override void onMouseOut(MouseOutEvent mouseOutEvent); @Override void onMouseOver(MouseOverEvent mouseOverEvent); static final int TOP_TOOLTIP_SHIFT; }
@Test public void tooltipShouldBeShown() throws Exception { widget.onMouseOver(mock(MouseOverEvent.class)); verify(tooltip).setPopupPosition(0, TOP_TOOLTIP_SHIFT); verify(tooltip).show(); }