### Question:
DiagramEditorView extends BaseEditorViewImpl implements AbstractDiagramEditor.View { @Override protected void onAttach() { super.onAttach(); if (getElement().getParentElement() != null) { getElement().getParentElement().getStyle().setHeight(100, Style.Unit.PCT); getElement().getParentElement().getStyle().setWidth(100, Style.Unit.PCT); getElement().getParentElement().getStyle().setDisplay(Style.Display.TABLE); } } 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 testOnAttach() { testOnAttach(true); testOnAttach(false); }