### Question:
DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override public void setWidget(final IsWidget widget) { editorPanel.clear(); editorPanel.add(widget); } protected  DiagramEditorView(); @Inject  DiagramEditorView(final ResizeFlowPanel editorPanel); @Override void init(final DiagramEditorCore presenter); @Override void onResize(); @Override void setWidget(final IsWidget widget); @PreDestroy void destroy();  }### Answer:
@Test public void testSetWidget() { final IsWidget editor = mock(IsWidget.class); tested.setWidget(editor); verify(editorPanel).clear(); verify(editorPanel).add(eq(editor)); }