### Question:
MarshallingResponsePopupView implements MarshallingResponsePopup.View,
                   IsElement { @PostConstruct void init() { copyToClipboardButton.setType(Button.ButtonType.BUTTON); copyToClipboardButton.setButtonStyleType(Button.ButtonStyleType.DEFAULT); copyToClipboardButton.addIcon("fa", "fa-clipboard"); copyToClipboardButton.setClickHandler(this::onCopyToClipboardClick); copyToClipboardButton.getElement().title = translationService.getValue(StunnerWidgetsConstants.MarshallingResponsePopup_CopyToClipboardActionTitle); messagesTable.getRightActionsToolbar().add(buildWrapperWidget(copyToClipboardButton.getElement())); okButton.setText(translationService.getValue(StunnerWidgetsConstants.MarshallingResponsePopup_OkAction)); okButton.setClickHandler(this::onOkButtonClick); cancelButton.setText(translationService.getValue(StunnerWidgetsConstants.MarshallingResponsePopup_CancelAction)); cancelButton.setClickHandler(this::onHide); initTable(); }  @Override void init(MarshallingResponsePopup presenter); @Override void setTitle(String title); @Override void setInlineNotification(String notificationMessage, InlineNotification.InlineNotificationType notificationType); @Override void setOkActionLabel(String okActionLabel); @Override void setOkActionEnabled(boolean enabled); @Override ListDataProvider<MarshallingResponsePopup.Row> getMessagesTableProvider(); @Override void show(Command okCommand); @Override void copyToClipboard(String text);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testInit() { when(translationService.getValue(StunnerWidgetsConstants.MarshallingResponsePopup_OkAction)).thenReturn(StunnerWidgetsConstants.MarshallingResponsePopup_OkAction); when(translationService.getValue(StunnerWidgetsConstants.MarshallingResponsePopup_CancelAction)).thenReturn(StunnerWidgetsConstants.MarshallingResponsePopup_CancelAction); when(translationService.getValue(StunnerWidgetsConstants.MarshallingResponsePopup_LevelTableColumnName)).thenReturn(StunnerWidgetsConstants.MarshallingResponsePopup_LevelTableColumnName); when(translationService.getValue(StunnerWidgetsConstants.MarshallingResponsePopup_MessageTableColumnName)).thenReturn(StunnerWidgetsConstants.MarshallingResponsePopup_MessageTableColumnName); view.init(); verify(copyToClipboardButton).setType(Button.ButtonType.BUTTON); verify(copyToClipboardButton).setButtonStyleType(Button.ButtonStyleType.DEFAULT); verify(copyToClipboardButton).addIcon("fa", "fa-clipboard"); verify(copyToClipboardButton).setClickHandler(any(Command.class)); verify(actionsToolbar).add(copyToClipboardButtonElementWrapperWidget); okButton.setText(StunnerWidgetsConstants.MarshallingResponsePopup_OkAction); cancelButton.setText(StunnerWidgetsConstants.MarshallingResponsePopup_CancelAction); verify(okButton).setClickHandler(okButtonCaptor.capture()); verify(copyToClipboardButton).setClickHandler(copyToClipboardCaptor.capture()); messagesTable.setColumnPickerButtonVisible(true); messagesTableProvider.addDataDisplay(messagesTable); verify(messagesTable).addColumn(levelColumnCaptor.capture(), eq(StunnerWidgetsConstants.MarshallingResponsePopup_LevelTableColumnName)); verify(messagesTable).setColumnWidth(eq(levelColumnCaptor.getValue()), eq(80d), eq(Style.Unit.PX)); verify(messagesTable).addColumn(messageColumnCaptor.capture(), eq(StunnerWidgetsConstants.MarshallingResponsePopup_MessageTableColumnName)); }
@Test public void testInitPresenter() { view.init(presenter); assertEquals(view.presenter, presenter); }
@Test public void testOnCopyToClipboard() { testInit(); view.init(presenter); copyToClipboardCaptor.getValue().execute(); verify(presenter).onCopyToClipboard(); }