### Question:
DataTypeListItemView implements DataTypeListItem.View { void setupEventHandlers() { getEditButton().onclick = getOnEditAction(); getSaveButton().onclick = getOnSaveAction(); getCloseButton().onclick = getOnCloseAction(); getArrow().onclick = getOnArrowClickAction(); getAddDataTypeRowButton().onclick = getOnAddDataTypeRowAction(); getRemoveButton().onclick = getOnRemoveButtonAction(); } @Inject  DataTypeListItemView(final HTMLDivElement view,
                                final TranslationService translationService,
                                final @DMNEditor ReadOnlyProvider readOnlyProvider); @Override void init(final DataTypeListItem presenter); @Override HTMLElement getElement(); @Override void toggleArrow(final boolean show); @Override void expand(); @Override void collapse(); @Override void showEditButton(); @Override void showSaveButton(); @Override void enableFocusMode(); @Override void disableFocusMode(); @Override boolean isOnFocusMode(); @Override String getName(); @Override void setName(final String name); @Override void showDataTypeNameInput(); @Override void hideDataTypeNameInput(); @Override void setupSelectComponent(final DataTypeSelect typeSelect); @Override void setupConstraintComponent(final DataTypeConstraint dataTypeConstraintComponent); @Override void setupListComponent(final SmallSwitchComponent dataTypeListComponent); @Override void showListContainer(); @Override void hideListContainer(); @Override void showListYesLabel(); @Override void hideListYesLabel(); @Override boolean isCollapsed(); @Override void setDataType(final DataType dataType); static final String UUID_ATTR; static final String NAME_DATA_FIELD; static final String PARENT_UUID_ATTR; }### Answer:
@Test public void testSetupEventHandlers() { final Element editButton = mock(Element.class); final Element saveButton = mock(Element.class); final Element closeButton = mock(Element.class); final Element arrow = mock(Element.class); final Element addDataTypeRow = mock(Element.class); final Element removeButton = mock(Element.class); final OnclickFn onEditAction = mock(OnclickFn.class); final OnclickFn onSaveAction = mock(OnclickFn.class); final OnclickFn onCloseAction = mock(OnclickFn.class); final OnclickFn onArrowClickAction = mock(OnclickFn.class); final OnclickFn onAddDataTypeRowAction = mock(OnclickFn.class); final OnclickFn onRemoveButtonAction = mock(OnclickFn.class); doReturn(editButton).when(view).getEditButton(); doReturn(saveButton).when(view).getSaveButton(); doReturn(closeButton).when(view).getCloseButton(); doReturn(arrow).when(view).getArrow(); doReturn(addDataTypeRow).when(view).getAddDataTypeRowButton(); doReturn(removeButton).when(view).getRemoveButton(); doReturn(onEditAction).when(view).getOnEditAction(); doReturn(onSaveAction).when(view).getOnSaveAction(); doReturn(onCloseAction).when(view).getOnCloseAction(); doReturn(onArrowClickAction).when(view).getOnArrowClickAction(); doReturn(onAddDataTypeRowAction).when(view).getOnAddDataTypeRowAction(); doReturn(onRemoveButtonAction).when(view).getOnRemoveButtonAction(); editButton.onclick = null; saveButton.onclick = null; closeButton.onclick = null; arrow.onclick = null; addDataTypeRow.onclick = null; removeButton.onclick = null; view.setupEventHandlers(); assertEquals(onEditAction, editButton.onclick); assertEquals(onSaveAction, saveButton.onclick); assertEquals(onCloseAction, closeButton.onclick); assertEquals(onArrowClickAction, arrow.onclick); assertEquals(onAddDataTypeRowAction, addDataTypeRow.onclick); assertEquals(onRemoveButtonAction, removeButton.onclick); }