### Question:
DiagramEditorScreenViewImpl implements DiagramEditorScreenView,
                                                    IsElement { @Override public DiagramEditorScreenView setWidget(final IsWidget widget) { widgetPanel.clear(); widgetPanel.add(widget); return this; } @Inject  DiagramEditorScreenViewImpl(final @DataField FlowPanel loadingPanel,
                                       final @DataField FlowPanel widgetPanel); @Override DiagramEditorScreenView setWidget(final IsWidget widget); @Override DiagramEditorScreenView showLoading(); @Override DiagramEditorScreenView hideLoading(); @Override IsWidget asWidget(); @PreDestroy void destroy();  }### Answer:
@Test public void testSetWidget() { tested.setWidget(widget); verify(widgetPanel, times(1)).clear(); verify(widgetPanel, times(1)).add(any(IsWidget.class)); }