MessageDialogFooter extends Composite { @UiHandler("okButton") public void handleOkClick(final ClickEvent event) { this.actionDelegate.accepted(); } @Inject  MessageDialogFooter(final @NotNull UILocalizationConstant messages); void setDelegate(@NotNull ActionDelegate delegate); void setConfirmButtonText(@NotNull String text); @UiHandler("okButton") void handleOkClick(final ClickEvent event);  }
@Test public void shouldCallAcceptedOnOkClicked() throws Exception { footer.handleOkClick(mock(ClickEvent.class)); verify(actionDelegate).accepted(); }